aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/ch.c2
-rw-r--r--drivers/scsi/osd/osd_uld.c2
-rw-r--r--drivers/scsi/osst.c2
-rw-r--r--drivers/scsi/scsi_scan.c9
-rw-r--r--drivers/scsi/sd.c2
-rw-r--r--drivers/scsi/ses.c2
-rw-r--r--drivers/scsi/sr.c2
-rw-r--r--drivers/scsi/st.c2
-rw-r--r--include/scsi/scsi_driver.h1
9 files changed, 11 insertions, 13 deletions
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index 4f502f95f3b8..6bac8a746ee2 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -972,9 +972,9 @@ static int ch_remove(struct device *dev)
972} 972}
973 973
974static struct scsi_driver ch_template = { 974static struct scsi_driver ch_template = {
975 .owner = THIS_MODULE,
976 .gendrv = { 975 .gendrv = {
977 .name = "ch", 976 .name = "ch",
977 .owner = THIS_MODULE,
978 .probe = ch_probe, 978 .probe = ch_probe,
979 .remove = ch_remove, 979 .remove = ch_remove,
980 }, 980 },
diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c
index 92cdd4b06526..243eab3d10d0 100644
--- a/drivers/scsi/osd/osd_uld.c
+++ b/drivers/scsi/osd/osd_uld.c
@@ -540,9 +540,9 @@ static int osd_remove(struct device *dev)
540 */ 540 */
541 541
542static struct scsi_driver osd_driver = { 542static struct scsi_driver osd_driver = {
543 .owner = THIS_MODULE,
544 .gendrv = { 543 .gendrv = {
545 .name = osd_name, 544 .name = osd_name,
545 .owner = THIS_MODULE,
546 .probe = osd_probe, 546 .probe = osd_probe,
547 .remove = osd_remove, 547 .remove = osd_remove,
548 } 548 }
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 8c384648eef9..5033223f6287 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -172,9 +172,9 @@ static int osst_probe(struct device *);
172static int osst_remove(struct device *); 172static int osst_remove(struct device *);
173 173
174static struct scsi_driver osst_template = { 174static struct scsi_driver osst_template = {
175 .owner = THIS_MODULE,
176 .gendrv = { 175 .gendrv = {
177 .name = "osst", 176 .name = "osst",
177 .owner = THIS_MODULE,
178 .probe = osst_probe, 178 .probe = osst_probe,
179 .remove = osst_remove, 179 .remove = osst_remove,
180 } 180 }
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);
1593 1593
1594void scsi_rescan_device(struct device *dev) 1594void scsi_rescan_device(struct device *dev)
1595{ 1595{
1596 struct scsi_driver *drv;
1597
1598 if (!dev->driver) 1596 if (!dev->driver)
1599 return; 1597 return;
1600 1598
1601 drv = to_scsi_driver(dev->driver); 1599 if (try_module_get(dev->driver->owner)) {
1602 if (try_module_get(drv->owner)) { 1600 struct scsi_driver *drv = to_scsi_driver(dev->driver);
1601
1603 if (drv->rescan) 1602 if (drv->rescan)
1604 drv->rescan(dev); 1603 drv->rescan(dev);
1605 module_put(drv->owner); 1604 module_put(dev->driver->owner);
1606 } 1605 }
1607} 1606}
1608EXPORT_SYMBOL(scsi_rescan_device); 1607EXPORT_SYMBOL(scsi_rescan_device);
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index f2e9b1dad574..54abcb220ab4 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -510,9 +510,9 @@ static const struct dev_pm_ops sd_pm_ops = {
510}; 510};
511 511
512static struct scsi_driver sd_template = { 512static struct scsi_driver sd_template = {
513 .owner = THIS_MODULE,
514 .gendrv = { 513 .gendrv = {
515 .name = "sd", 514 .name = "sd",
515 .owner = THIS_MODULE,
516 .probe = sd_probe, 516 .probe = sd_probe,
517 .remove = sd_remove, 517 .remove = sd_remove,
518 .shutdown = sd_shutdown, 518 .shutdown = sd_shutdown,
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 80bfece1a2de..b7e79e7646ad 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -693,9 +693,9 @@ static struct class_interface ses_interface = {
693}; 693};
694 694
695static struct scsi_driver ses_template = { 695static struct scsi_driver ses_template = {
696 .owner = THIS_MODULE,
697 .gendrv = { 696 .gendrv = {
698 .name = "ses", 697 .name = "ses",
698 .owner = THIS_MODULE,
699 .probe = ses_probe, 699 .probe = ses_probe,
700 .remove = ses_remove, 700 .remove = ses_remove,
701 }, 701 },
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 5ebadc2ace9b..8bd54a64efd6 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -88,9 +88,9 @@ static struct dev_pm_ops sr_pm_ops = {
88}; 88};
89 89
90static struct scsi_driver sr_template = { 90static struct scsi_driver sr_template = {
91 .owner = THIS_MODULE,
92 .gendrv = { 91 .gendrv = {
93 .name = "sr", 92 .name = "sr",
93 .owner = THIS_MODULE,
94 .probe = sr_probe, 94 .probe = sr_probe,
95 .remove = sr_remove, 95 .remove = sr_remove,
96 .pm = &sr_pm_ops, 96 .pm = &sr_pm_ops,
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index e46e02b24ba4..128d3b55bdd9 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -202,9 +202,9 @@ static int do_create_sysfs_files(void);
202static void do_remove_sysfs_files(void); 202static void do_remove_sysfs_files(void);
203 203
204static struct scsi_driver st_template = { 204static struct scsi_driver st_template = {
205 .owner = THIS_MODULE,
206 .gendrv = { 205 .gendrv = {
207 .name = "st", 206 .name = "st",
207 .owner = THIS_MODULE,
208 .probe = st_probe, 208 .probe = st_probe,
209 .remove = st_remove, 209 .remove = st_remove,
210 }, 210 },
diff --git a/include/scsi/scsi_driver.h b/include/scsi/scsi_driver.h
index c2b759809d8a..891a658aa867 100644
--- a/include/scsi/scsi_driver.h
+++ b/include/scsi/scsi_driver.h
@@ -9,7 +9,6 @@ struct scsi_cmnd;
9struct scsi_device; 9struct scsi_device;
10 10
11struct scsi_driver { 11struct scsi_driver {
12 struct module *owner;
13 struct device_driver gendrv; 12 struct device_driver gendrv;
14 13
15 void (*rescan)(struct device *); 14 void (*rescan)(struct device *);