[S390] ccw_driver: remove duplicate members
Sebastian Ott [Wed, 23 Mar 2011 09:16:02 +0000 (10:16 +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 ff6f62e..623f2fb 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 379d859..459f2cb 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 be89b3a..4b71b11 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 3fb4335..694464c 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 96ba2fd..4c02376 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 c265111..9eff2df 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 de2e99e..b98dcbd 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 caef175..f6b00c3 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 e50b121..334459e 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 ce3a5c1..2e2d2df 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 4c28459..97fd480 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 30b2a82..f59429c 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 25eef30..150b2cd 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 4f7852d..e8b7cee 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,