aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2011-03-23 05:16:02 -0400
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-03-23 05:15:59 -0400
commit3bda058b0c39fc72188116d2fd71af08dd0fe5b0 (patch)
tree94d2cb60f495ebb6b14b40ad9e23feb9ba001ce9 /drivers
parent9a26513eb67ec4b2cb1744834076afad21b68aac (diff)
[S390] ccw_driver: remove duplicate members
Remove the owner and name members of struct ccw_driver and convert all drivers to store this data in the embedded struct device_driver. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/block/dasd_eckd.c6
-rw-r--r--drivers/s390/block/dasd_fba.c6
-rw-r--r--drivers/s390/char/con3215.c6
-rw-r--r--drivers/s390/char/raw3270.c6
-rw-r--r--drivers/s390/char/tape_34xx.c6
-rw-r--r--drivers/s390/char/tape_3590.c6
-rw-r--r--drivers/s390/char/vmur.c6
-rw-r--r--drivers/s390/cio/device.c6
-rw-r--r--drivers/s390/net/claw.c6
-rw-r--r--drivers/s390/net/ctcm_main.c6
-rw-r--r--drivers/s390/net/lcs.c6
-rw-r--r--drivers/s390/net/qeth_core_main.c4
-rw-r--r--drivers/s390/scsi/zfcp_ccw.c6
13 files changed, 49 insertions, 27 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 379d8592bc6e..459f2cbe80fc 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -3982,8 +3982,10 @@ out_err:
3982} 3982}
3983 3983
3984static struct ccw_driver dasd_eckd_driver = { 3984static struct ccw_driver dasd_eckd_driver = {
3985 .name = "dasd-eckd", 3985 .driver = {
3986 .owner = THIS_MODULE, 3986 .name = "dasd-eckd",
3987 .owner = THIS_MODULE,
3988 },
3987 .ids = dasd_eckd_ids, 3989 .ids = dasd_eckd_ids,
3988 .probe = dasd_eckd_probe, 3990 .probe = dasd_eckd_probe,
3989 .remove = dasd_generic_remove, 3991 .remove = dasd_generic_remove,
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
index be89b3a893da..4b71b1164868 100644
--- a/drivers/s390/block/dasd_fba.c
+++ b/drivers/s390/block/dasd_fba.c
@@ -65,8 +65,10 @@ dasd_fba_set_online(struct ccw_device *cdev)
65} 65}
66 66
67static struct ccw_driver dasd_fba_driver = { 67static struct ccw_driver dasd_fba_driver = {
68 .name = "dasd-fba", 68 .driver = {
69 .owner = THIS_MODULE, 69 .name = "dasd-fba",
70 .owner = THIS_MODULE,
71 },
70 .ids = dasd_fba_ids, 72 .ids = dasd_fba_ids,
71 .probe = dasd_fba_probe, 73 .probe = dasd_fba_probe,
72 .remove = dasd_generic_remove, 74 .remove = dasd_generic_remove,
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index 3fb4335d491d..694464c65fcd 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -764,8 +764,10 @@ static struct ccw_device_id raw3215_id[] = {
764}; 764};
765 765
766static struct ccw_driver raw3215_ccw_driver = { 766static struct ccw_driver raw3215_ccw_driver = {
767 .name = "3215", 767 .driver = {
768 .owner = THIS_MODULE, 768 .name = "3215",
769 .owner = THIS_MODULE,
770 },
769 .ids = raw3215_id, 771 .ids = raw3215_id,
770 .probe = &raw3215_probe, 772 .probe = &raw3215_probe,
771 .remove = &raw3215_remove, 773 .remove = &raw3215_remove,
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c
index 96ba2fd1c8ad..4c023761946f 100644
--- a/drivers/s390/char/raw3270.c
+++ b/drivers/s390/char/raw3270.c
@@ -1388,8 +1388,10 @@ static struct ccw_device_id raw3270_id[] = {
1388}; 1388};
1389 1389
1390static struct ccw_driver raw3270_ccw_driver = { 1390static struct ccw_driver raw3270_ccw_driver = {
1391 .name = "3270", 1391 .driver = {
1392 .owner = THIS_MODULE, 1392 .name = "3270",
1393 .owner = THIS_MODULE,
1394 },
1393 .ids = raw3270_id, 1395 .ids = raw3270_id,
1394 .probe = &raw3270_probe, 1396 .probe = &raw3270_probe,
1395 .remove = &raw3270_remove, 1397 .remove = &raw3270_remove,
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c
index c26511171ffe..9eff2df70ddb 100644
--- a/drivers/s390/char/tape_34xx.c
+++ b/drivers/s390/char/tape_34xx.c
@@ -1320,8 +1320,10 @@ tape_34xx_online(struct ccw_device *cdev)
1320} 1320}
1321 1321
1322static struct ccw_driver tape_34xx_driver = { 1322static struct ccw_driver tape_34xx_driver = {
1323 .name = "tape_34xx", 1323 .driver = {
1324 .owner = THIS_MODULE, 1324 .name = "tape_34xx",
1325 .owner = THIS_MODULE,
1326 },
1325 .ids = tape_34xx_ids, 1327 .ids = tape_34xx_ids,
1326 .probe = tape_generic_probe, 1328 .probe = tape_generic_probe,
1327 .remove = tape_generic_remove, 1329 .remove = tape_generic_remove,
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c
index de2e99e0a71b..b98dcbd16711 100644
--- a/drivers/s390/char/tape_3590.c
+++ b/drivers/s390/char/tape_3590.c
@@ -1761,8 +1761,10 @@ tape_3590_online(struct ccw_device *cdev)
1761} 1761}
1762 1762
1763static struct ccw_driver tape_3590_driver = { 1763static struct ccw_driver tape_3590_driver = {
1764 .name = "tape_3590", 1764 .driver = {
1765 .owner = THIS_MODULE, 1765 .name = "tape_3590",
1766 .owner = THIS_MODULE,
1767 },
1766 .ids = tape_3590_ids, 1768 .ids = tape_3590_ids,
1767 .probe = tape_generic_probe, 1769 .probe = tape_generic_probe,
1768 .remove = tape_generic_remove, 1770 .remove = tape_generic_remove,
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c
index caef1757341d..f6b00c3df425 100644
--- a/drivers/s390/char/vmur.c
+++ b/drivers/s390/char/vmur.c
@@ -64,8 +64,10 @@ static int ur_set_offline(struct ccw_device *cdev);
64static int ur_pm_suspend(struct ccw_device *cdev); 64static int ur_pm_suspend(struct ccw_device *cdev);
65 65
66static struct ccw_driver ur_driver = { 66static struct ccw_driver ur_driver = {
67 .name = "vmur", 67 .driver = {
68 .owner = THIS_MODULE, 68 .name = "vmur",
69 .owner = THIS_MODULE,
70 },
69 .ids = ur_ids, 71 .ids = ur_ids,
70 .probe = ur_probe, 72 .probe = ur_probe,
71 .remove = ur_remove, 73 .remove = ur_remove,
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index e50b12163afe..334459eb23c8 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -547,7 +547,7 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
547 if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0) 547 if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0)
548 return -EAGAIN; 548 return -EAGAIN;
549 549
550 if (cdev->drv && !try_module_get(cdev->drv->owner)) { 550 if (cdev->drv && !try_module_get(cdev->drv->driver.owner)) {
551 atomic_set(&cdev->private->onoff, 0); 551 atomic_set(&cdev->private->onoff, 0);
552 return -EINVAL; 552 return -EINVAL;
553 } 553 }
@@ -573,7 +573,7 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
573 } 573 }
574out: 574out:
575 if (cdev->drv) 575 if (cdev->drv)
576 module_put(cdev->drv->owner); 576 module_put(cdev->drv->driver.owner);
577 atomic_set(&cdev->private->onoff, 0); 577 atomic_set(&cdev->private->onoff, 0);
578 return (ret < 0) ? ret : count; 578 return (ret < 0) ? ret : count;
579} 579}
@@ -1993,8 +1993,6 @@ int ccw_driver_register(struct ccw_driver *cdriver)
1993 struct device_driver *drv = &cdriver->driver; 1993 struct device_driver *drv = &cdriver->driver;
1994 1994
1995 drv->bus = &ccw_bus_type; 1995 drv->bus = &ccw_bus_type;
1996 drv->name = cdriver->name;
1997 drv->owner = cdriver->owner;
1998 1996
1999 return driver_register(drv); 1997 return driver_register(drv);
2000} 1998}
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c
index ce3a5c13ce0b..2e2d2dfe78db 100644
--- a/drivers/s390/net/claw.c
+++ b/drivers/s390/net/claw.c
@@ -282,8 +282,10 @@ static struct ccw_device_id claw_ids[] = {
282MODULE_DEVICE_TABLE(ccw, claw_ids); 282MODULE_DEVICE_TABLE(ccw, claw_ids);
283 283
284static struct ccw_driver claw_ccw_driver = { 284static struct ccw_driver claw_ccw_driver = {
285 .owner = THIS_MODULE, 285 .driver = {
286 .name = "claw", 286 .owner = THIS_MODULE,
287 .name = "claw",
288 },
287 .ids = claw_ids, 289 .ids = claw_ids,
288 .probe = ccwgroup_probe_ccwdev, 290 .probe = ccwgroup_probe_ccwdev,
289 .remove = ccwgroup_remove_ccwdev, 291 .remove = ccwgroup_remove_ccwdev,
diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c
index 4c2845985927..97fd4800ab12 100644
--- a/drivers/s390/net/ctcm_main.c
+++ b/drivers/s390/net/ctcm_main.c
@@ -1764,8 +1764,10 @@ static struct ccw_device_id ctcm_ids[] = {
1764MODULE_DEVICE_TABLE(ccw, ctcm_ids); 1764MODULE_DEVICE_TABLE(ccw, ctcm_ids);
1765 1765
1766static struct ccw_driver ctcm_ccw_driver = { 1766static struct ccw_driver ctcm_ccw_driver = {
1767 .owner = THIS_MODULE, 1767 .driver = {
1768 .name = "ctcm", 1768 .owner = THIS_MODULE,
1769 .name = "ctcm",
1770 },
1769 .ids = ctcm_ids, 1771 .ids = ctcm_ids,
1770 .probe = ccwgroup_probe_ccwdev, 1772 .probe = ccwgroup_probe_ccwdev,
1771 .remove = ccwgroup_remove_ccwdev, 1773 .remove = ccwgroup_remove_ccwdev,
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index 30b2a820e670..f59429c3bc30 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -2396,8 +2396,10 @@ static struct ccw_device_id lcs_ids[] = {
2396MODULE_DEVICE_TABLE(ccw, lcs_ids); 2396MODULE_DEVICE_TABLE(ccw, lcs_ids);
2397 2397
2398static struct ccw_driver lcs_ccw_driver = { 2398static struct ccw_driver lcs_ccw_driver = {
2399 .owner = THIS_MODULE, 2399 .driver = {
2400 .name = "lcs", 2400 .owner = THIS_MODULE,
2401 .name = "lcs",
2402 },
2401 .ids = lcs_ids, 2403 .ids = lcs_ids,
2402 .probe = ccwgroup_probe_ccwdev, 2404 .probe = ccwgroup_probe_ccwdev,
2403 .remove = ccwgroup_remove_ccwdev, 2405 .remove = ccwgroup_remove_ccwdev,
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 25eef304bd47..150b2cd99ba8 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -3902,7 +3902,9 @@ static struct ccw_device_id qeth_ids[] = {
3902MODULE_DEVICE_TABLE(ccw, qeth_ids); 3902MODULE_DEVICE_TABLE(ccw, qeth_ids);
3903 3903
3904static struct ccw_driver qeth_ccw_driver = { 3904static struct ccw_driver qeth_ccw_driver = {
3905 .name = "qeth", 3905 .driver = {
3906 .name = "qeth",
3907 },
3906 .ids = qeth_ids, 3908 .ids = qeth_ids,
3907 .probe = ccwgroup_probe_ccwdev, 3909 .probe = ccwgroup_probe_ccwdev,
3908 .remove = ccwgroup_remove_ccwdev, 3910 .remove = ccwgroup_remove_ccwdev,
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c
index 4f7852dd30c7..e8b7cee62046 100644
--- a/drivers/s390/scsi/zfcp_ccw.c
+++ b/drivers/s390/scsi/zfcp_ccw.c
@@ -251,8 +251,10 @@ static void zfcp_ccw_shutdown(struct ccw_device *cdev)
251} 251}
252 252
253struct ccw_driver zfcp_ccw_driver = { 253struct ccw_driver zfcp_ccw_driver = {
254 .owner = THIS_MODULE, 254 .driver = {
255 .name = "zfcp", 255 .owner = THIS_MODULE,
256 .name = "zfcp",
257 },
256 .ids = zfcp_ccw_device_id, 258 .ids = zfcp_ccw_device_id,
257 .probe = zfcp_ccw_probe, 259 .probe = zfcp_ccw_probe,
258 .remove = zfcp_ccw_remove, 260 .remove = zfcp_ccw_remove,