diff options
author | Christoph Hellwig <hch@lst.de> | 2014-11-12 18:34:51 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-24 20:01:28 +0100 |
commit | 3af6b35261182ff185db1f0fd271254147e2663e (patch) | |
tree | 13fbac49b3ecb681bf69b13301eca9352e545573 /drivers/scsi/scsi_scan.c | |
parent | 82042a2cdb55cd8402207f14a6e2c24d7a5febe8 (diff) |
scsi: remove scsi_driver owner field
The driver core driver structure has grown an owner field and now
requires it to be set for all modular drivers. Set it up for
all scsi_driver instances and get rid of the now superflous
scsi_driver owner field.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Shane M Seymour <shane.seymour@hp.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com
Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
-rw-r--r-- | drivers/scsi/scsi_scan.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index d97597e6337e..0cda53adfd35 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -1593,16 +1593,15 @@ EXPORT_SYMBOL(scsi_add_device); void scsi_rescan_device(struct device *dev) { - struct scsi_driver *drv; - if (!dev->driver) return; - drv = to_scsi_driver(dev->driver); - if (try_module_get(drv->owner)) { + if (try_module_get(dev->driver->owner)) { + struct scsi_driver *drv = to_scsi_driver(dev->driver); + if (drv->rescan) drv->rescan(dev); - module_put(drv->owner); + module_put(dev->driver->owner); } } EXPORT_SYMBOL(scsi_rescan_device); |