[S390] ccw_driver: remove duplicate members
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Wed, 23 Mar 2011 09:16:02 +0000 (10:16 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Wed, 23 Mar 2011 09:15:59 +0000 (10:15 +0100)
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>
14 files changed:
arch/s390/include/asm/ccwdev.h
drivers/s390/block/dasd_eckd.c
drivers/s390/block/dasd_fba.c
drivers/s390/char/con3215.c
drivers/s390/char/raw3270.c
drivers/s390/char/tape_34xx.c
drivers/s390/char/tape_3590.c
drivers/s390/char/vmur.c
drivers/s390/cio/device.c
drivers/s390/net/claw.c
drivers/s390/net/ctcm_main.c
drivers/s390/net/lcs.c
drivers/s390/net/qeth_core_main.c
drivers/s390/scsi/zfcp_ccw.c

index ff6f62e0ec3e01fcb3736a2dc55e06da267a4ced..623f2fb71774af7a352df0075f8253e776c15839 100644 (file)
@@ -112,7 +112,6 @@ enum uc_todo {
 
 /**
  * struct ccw driver - device driver for channel attached devices
- * @owner: owning module
  * @ids: ids supported by this driver
  * @probe: function called on probe
  * @remove: function called on remove
@@ -128,10 +127,8 @@ enum uc_todo {
  * @restore: callback for restoring after hibernation
  * @uc_handler: callback for unit check handler
  * @driver: embedded device driver structure
- * @name: device driver name
  */
 struct ccw_driver {
-       struct module *owner;
        struct ccw_device_id *ids;
        int (*probe) (struct ccw_device *);
        void (*remove) (struct ccw_device *);
@@ -147,7 +144,6 @@ struct ccw_driver {
        int (*restore)(struct ccw_device *);
        enum uc_todo (*uc_handler) (struct ccw_device *, struct irb *);
        struct device_driver driver;
-       char *name;
 };
 
 extern struct ccw_device *get_ccwdev_by_busid(struct ccw_driver *cdrv,
index 379d8592bc6e371a24ac960eaff5b11a8a20909e..459f2cbe80fccca7c3e0d338bbe18f8bb7123de4 100644 (file)
@@ -3982,8 +3982,10 @@ out_err:
 }
 
 static struct ccw_driver dasd_eckd_driver = {
-       .name        = "dasd-eckd",
-       .owner       = THIS_MODULE,
+       .driver = {
+               .name   = "dasd-eckd",
+               .owner  = THIS_MODULE,
+       },
        .ids         = dasd_eckd_ids,
        .probe       = dasd_eckd_probe,
        .remove      = dasd_generic_remove,
index be89b3a893da4c91aa84cf509a1ab1717b3adfc0..4b71b116486838daea8132a832fcaa200f720016 100644 (file)
@@ -65,8 +65,10 @@ dasd_fba_set_online(struct ccw_device *cdev)
 }
 
 static struct ccw_driver dasd_fba_driver = {
-       .name        = "dasd-fba",
-       .owner       = THIS_MODULE,
+       .driver = {
+               .name   = "dasd-fba",
+               .owner  = THIS_MODULE,
+       },
        .ids         = dasd_fba_ids,
        .probe       = dasd_fba_probe,
        .remove      = dasd_generic_remove,
index 3fb4335d491d7aaf114769f026d13a4c8cbdcab5..694464c65fcdaaddd5c7c2b09514ca822e1606af 100644 (file)
@@ -764,8 +764,10 @@ static struct ccw_device_id raw3215_id[] = {
 };
 
 static struct ccw_driver raw3215_ccw_driver = {
-       .name           = "3215",
-       .owner          = THIS_MODULE,
+       .driver = {
+               .name   = "3215",
+               .owner  = THIS_MODULE,
+       },
        .ids            = raw3215_id,
        .probe          = &raw3215_probe,
        .remove         = &raw3215_remove,
index 96ba2fd1c8ad04added98cc56eb75aa4d3f61469..4c023761946f6bc196783a859f3a0ce60cded9f2 100644 (file)
@@ -1388,8 +1388,10 @@ static struct ccw_device_id raw3270_id[] = {
 };
 
 static struct ccw_driver raw3270_ccw_driver = {
-       .name           = "3270",
-       .owner          = THIS_MODULE,
+       .driver = {
+               .name   = "3270",
+               .owner  = THIS_MODULE,
+       },
        .ids            = raw3270_id,
        .probe          = &raw3270_probe,
        .remove         = &raw3270_remove,
index c26511171ffead57d7cce9d81612d09d84027185..9eff2df70ddb2e579c0e2ff3472278df080178d2 100644 (file)
@@ -1320,8 +1320,10 @@ tape_34xx_online(struct ccw_device *cdev)
 }
 
 static struct ccw_driver tape_34xx_driver = {
-       .name = "tape_34xx",
-       .owner = THIS_MODULE,
+       .driver = {
+               .name = "tape_34xx",
+               .owner = THIS_MODULE,
+       },
        .ids = tape_34xx_ids,
        .probe = tape_generic_probe,
        .remove = tape_generic_remove,
index de2e99e0a71b56747df232bef1110815979eec04..b98dcbd16711e7978d8c1fc58394f4797d851fe8 100644 (file)
@@ -1761,8 +1761,10 @@ tape_3590_online(struct ccw_device *cdev)
 }
 
 static struct ccw_driver tape_3590_driver = {
-       .name = "tape_3590",
-       .owner = THIS_MODULE,
+       .driver = {
+               .name = "tape_3590",
+               .owner = THIS_MODULE,
+       },
        .ids = tape_3590_ids,
        .probe = tape_generic_probe,
        .remove = tape_generic_remove,
index caef1757341d4ef7a8e60e1818bbcbfe03dd3675..f6b00c3df425d192da15790e75f16f6a6af09fb2 100644 (file)
@@ -64,8 +64,10 @@ static int ur_set_offline(struct ccw_device *cdev);
 static int ur_pm_suspend(struct ccw_device *cdev);
 
 static struct ccw_driver ur_driver = {
-       .name           = "vmur",
-       .owner          = THIS_MODULE,
+       .driver = {
+               .name   = "vmur",
+               .owner  = THIS_MODULE,
+       },
        .ids            = ur_ids,
        .probe          = ur_probe,
        .remove         = ur_remove,
index e50b12163afeafe74fabe266b51dfffd9b2c5fe8..334459eb23c89cb65f0bf65a46a7b7d46bbaea5c 100644 (file)
@@ -547,7 +547,7 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
        if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0)
                return -EAGAIN;
 
-       if (cdev->drv && !try_module_get(cdev->drv->owner)) {
+       if (cdev->drv && !try_module_get(cdev->drv->driver.owner)) {
                atomic_set(&cdev->private->onoff, 0);
                return -EINVAL;
        }
@@ -573,7 +573,7 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
        }
 out:
        if (cdev->drv)
-               module_put(cdev->drv->owner);
+               module_put(cdev->drv->driver.owner);
        atomic_set(&cdev->private->onoff, 0);
        return (ret < 0) ? ret : count;
 }
@@ -1993,8 +1993,6 @@ int ccw_driver_register(struct ccw_driver *cdriver)
        struct device_driver *drv = &cdriver->driver;
 
        drv->bus = &ccw_bus_type;
-       drv->name = cdriver->name;
-       drv->owner = cdriver->owner;
 
        return driver_register(drv);
 }
index ce3a5c13ce0bb88deec855f3fa39c4bd4360ab45..2e2d2dfe78db4849d7b76608236e3422eae38344 100644 (file)
@@ -282,8 +282,10 @@ static struct ccw_device_id claw_ids[] = {
 MODULE_DEVICE_TABLE(ccw, claw_ids);
 
 static struct ccw_driver claw_ccw_driver = {
-       .owner  = THIS_MODULE,
-       .name   = "claw",
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "claw",
+       },
        .ids    = claw_ids,
        .probe  = ccwgroup_probe_ccwdev,
        .remove = ccwgroup_remove_ccwdev,
index 4c28459859276dd8ebf0d3dbab55d4a3eeca4e24..97fd4800ab123b594816ca417a5e2ff06729fc23 100644 (file)
@@ -1764,8 +1764,10 @@ static struct ccw_device_id ctcm_ids[] = {
 MODULE_DEVICE_TABLE(ccw, ctcm_ids);
 
 static struct ccw_driver ctcm_ccw_driver = {
-       .owner  = THIS_MODULE,
-       .name   = "ctcm",
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "ctcm",
+       },
        .ids    = ctcm_ids,
        .probe  = ccwgroup_probe_ccwdev,
        .remove = ccwgroup_remove_ccwdev,
index 30b2a820e67019ae28d2b899d1bc032d7b37b9ee..f59429c3bc30beb4cb7f30dd6da78dbe49251941 100644 (file)
@@ -2396,8 +2396,10 @@ static struct ccw_device_id lcs_ids[] = {
 MODULE_DEVICE_TABLE(ccw, lcs_ids);
 
 static struct ccw_driver lcs_ccw_driver = {
-       .owner  = THIS_MODULE,
-       .name   = "lcs",
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "lcs",
+       },
        .ids    = lcs_ids,
        .probe  = ccwgroup_probe_ccwdev,
        .remove = ccwgroup_remove_ccwdev,
index 25eef304bd4774b67651d6507e808fb4a0dba027..150b2cd99ba86e15f07c7b23150bbca48dc1502c 100644 (file)
@@ -3902,7 +3902,9 @@ static struct ccw_device_id qeth_ids[] = {
 MODULE_DEVICE_TABLE(ccw, qeth_ids);
 
 static struct ccw_driver qeth_ccw_driver = {
-       .name = "qeth",
+       .driver = {
+               .name = "qeth",
+       },
        .ids = qeth_ids,
        .probe = ccwgroup_probe_ccwdev,
        .remove = ccwgroup_remove_ccwdev,
index 4f7852dd30c7723c78c9409a07dfd05329f09ac0..e8b7cee62046e994187499139eda8333d766bca2 100644 (file)
@@ -251,8 +251,10 @@ static void zfcp_ccw_shutdown(struct ccw_device *cdev)
 }
 
 struct ccw_driver zfcp_ccw_driver = {
-       .owner       = THIS_MODULE,
-       .name        = "zfcp",
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "zfcp",
+       },
        .ids         = zfcp_ccw_device_id,
        .probe       = zfcp_ccw_probe,
        .remove      = zfcp_ccw_remove,