summaryrefslogtreecommitdiff
path: root/drivers/scsi/device_handler/scsi_dh_emc.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-08-27 12:16:58 (GMT)
committerJames Bottomley <JBottomley@Odin.com>2015-08-28 20:14:56 (GMT)
commitd95dbff2a41e934cd8789734b34dc591e78ba11c (patch)
treeca293978ae9c923ba143a5c1d00aba07616a8ef1 /drivers/scsi/device_handler/scsi_dh_emc.c
parent086b91d052ebe4ead5d28021afe3bdfd70af15bf (diff)
downloadlinux-d95dbff2a41e934cd8789734b34dc591e78ba11c.tar.xz
scsi_dh: move device matching to the core code
Add a single list of devices that need non-ALUA device handlers to the core scsi_dh code so that we can autoload the modules for them at probe time. While this is a little ugly in terms of architecture it actually significantly simplifies the code in addition to the new autoloading functionality. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Acked-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/device_handler/scsi_dh_emc.c')
-rw-r--r--drivers/scsi/device_handler/scsi_dh_emc.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c
index 6ed1caa..fd31e67 100644
--- a/drivers/scsi/device_handler/scsi_dh_emc.c
+++ b/drivers/scsi/device_handler/scsi_dh_emc.c
@@ -622,34 +622,6 @@ done:
return result;
}
-static const struct {
- char *vendor;
- char *model;
-} clariion_dev_list[] = {
- {"DGC", "RAID"},
- {"DGC", "DISK"},
- {"DGC", "VRAID"},
- {NULL, NULL},
-};
-
-static bool clariion_match(struct scsi_device *sdev)
-{
- int i;
-
- if (scsi_device_tpgs(sdev))
- return false;
-
- for (i = 0; clariion_dev_list[i].vendor; i++) {
- if (!strncmp(sdev->vendor, clariion_dev_list[i].vendor,
- strlen(clariion_dev_list[i].vendor)) &&
- !strncmp(sdev->model, clariion_dev_list[i].model,
- strlen(clariion_dev_list[i].model))) {
- return true;
- }
- }
- return false;
-}
-
static struct scsi_dh_data *clariion_bus_attach(struct scsi_device *sdev)
{
struct clariion_dh_data *h;
@@ -698,7 +670,6 @@ static struct scsi_device_handler clariion_dh = {
.activate = clariion_activate,
.prep_fn = clariion_prep_fn,
.set_params = clariion_set_params,
- .match = clariion_match,
};
static int __init clariion_init(void)