powerpc: don't duplicate name between vio_driver and device_driver
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 24 Oct 2005 04:53:21 +0000 (14:53 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 24 Oct 2005 05:42:12 +0000 (15:42 +1000)
Just set the name field directly in the device_driver structure
contained in the vio_driver struct.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
arch/powerpc/kernel/vio.c
drivers/block/viodasd.c
drivers/cdrom/viocd.c
drivers/char/hvc_vio.c
drivers/char/hvcs.c
drivers/char/viotape.c
drivers/net/ibmveth.c
drivers/net/iseries_veth.c
drivers/scsi/ibmvscsi/ibmvscsi.c
include/asm-powerpc/vio.h

index 0e555b7a65873b95a8fde0962a12910269aabbbd..3aec492ec76721d363390ffda237202de8e71738 100644 (file)
@@ -76,10 +76,9 @@ static int vio_bus_remove(struct device *dev)
 int vio_register_driver(struct vio_driver *viodrv)
 {
        printk(KERN_DEBUG "%s: driver %s registering\n", __FUNCTION__,
-               viodrv->name);
+               viodrv->driver.name);
 
        /* fill in 'struct driver' fields */
-       viodrv->driver.name = viodrv->name;
        viodrv->driver.bus = &vio_bus_type;
        viodrv->driver.probe = vio_bus_probe;
        viodrv->driver.remove = vio_bus_remove;
index e46ecd23b3ac74d6854c2839484e392326a71e6e..ea72faa83436df8ed65b433646d2b1d2e1485095 100644 (file)
@@ -781,10 +781,12 @@ static struct vio_device_id viodasd_device_table[] __devinitdata = {
 
 MODULE_DEVICE_TABLE(vio, viodasd_device_table);
 static struct vio_driver viodasd_driver = {
-       .name = "viodasd",
        .id_table = viodasd_device_table,
        .probe = viodasd_probe,
-       .remove = viodasd_remove
+       .remove = viodasd_remove,
+       .driver = {
+               .name = "viodasd",
+       }
 };
 
 /*
index 0829db58462fd8d55a7a34d3680c9feb5404d437..255d24ad704b2e92fa79002b189b230c1027d918 100644 (file)
@@ -739,10 +739,12 @@ static struct vio_device_id viocd_device_table[] __devinitdata = {
 
 MODULE_DEVICE_TABLE(vio, viocd_device_table);
 static struct vio_driver viocd_driver = {
-       .name = "viocd",
        .id_table = viocd_device_table,
        .probe = viocd_probe,
-       .remove = viocd_remove
+       .remove = viocd_remove,
+       .driver = {
+               .name = "viocd",
+       }
 };
 
 static int __init viocd_init(void)
index 78d681dc35a8f362d11466db471aaf2ae45cc312..f5212eb2b41d0d0436fe278817b5564dc49b7629 100644 (file)
@@ -95,11 +95,11 @@ static int __devexit hvc_vio_remove(struct vio_dev *vdev)
 }
 
 static struct vio_driver hvc_vio_driver = {
-       .name           = hvc_driver_name,
        .id_table       = hvc_driver_table,
        .probe          = hvc_vio_probe,
        .remove         = hvc_vio_remove,
        .driver         = {
+               .name   = hvc_driver_name,
                .owner  = THIS_MODULE,
        }
 };
index f47f009f9259c1597e60b1f7740c1f9bfeb6b203..8486298c011f7a7ec11519e87ea563b5b0d68bfd 100644 (file)
@@ -720,10 +720,12 @@ static int __devexit hvcs_remove(struct vio_dev *dev)
 };
 
 static struct vio_driver hvcs_vio_driver = {
-       .name           = hvcs_driver_name,
        .id_table       = hvcs_driver_table,
        .probe          = hvcs_probe,
        .remove         = hvcs_remove,
+       .driver         = {
+               .name   = hvcs_driver_name,
+       }
 };
 
 /* Only called from hvcs_get_pi please */
index 0aff45fac2e6c9f52fc3390bdf29b913f01b8f03..8fc1115c4b69249246ec978c953e3285233fd7ba 100644 (file)
@@ -996,10 +996,12 @@ static struct vio_device_id viotape_device_table[] __devinitdata = {
 
 MODULE_DEVICE_TABLE(vio, viotape_device_table);
 static struct vio_driver viotape_driver = {
-       .name = "viotape",
        .id_table = viotape_device_table,
        .probe = viotape_probe,
-       .remove = viotape_remove
+       .remove = viotape_remove,
+       .driver = {
+               .name = "viotape",
+       }
 };
 
 
index a2c4dd4fb2218071fbffb8aa9f9438ddacff359a..fcf6f2c7630019a5cf52d8e023dea21c604a831b 100644 (file)
@@ -1150,10 +1150,12 @@ static struct vio_device_id ibmveth_device_table[] __devinitdata= {
 MODULE_DEVICE_TABLE(vio, ibmveth_device_table);
 
 static struct vio_driver ibmveth_driver = {
-       .name        = (char *)ibmveth_driver_name,
-       .id_table    = ibmveth_device_table,
-       .probe       = ibmveth_probe,
-       .remove      = ibmveth_remove
+       .id_table       = ibmveth_device_table,
+       .probe          = ibmveth_probe,
+       .remove         = ibmveth_remove,
+       .driver         = {
+               .name   = ibmveth_driver_name,
+       }
 };
 
 static int __init ibmveth_module_init(void)
index db3bc2f6f0fad6566053b41d724c10212a693d9d..33613fe9556cc65fb91237faea0ee38dcef69a1e 100644 (file)
@@ -1648,10 +1648,12 @@ static struct vio_device_id veth_device_table[] __devinitdata = {
 MODULE_DEVICE_TABLE(vio, veth_device_table);
 
 static struct vio_driver veth_driver = {
-       .name = DRV_NAME,
        .id_table = veth_device_table,
        .probe = veth_probe,
-       .remove = veth_remove
+       .remove = veth_remove,
+       .driver = {
+               .name = DRV_NAME,
+       }
 };
 
 /*
index ff25210b00bac82b7ea9b500c5c528fafbed92b5..965e5373538cd2193a0f5f38bf729a02eab2e3ce 100644 (file)
@@ -1546,10 +1546,12 @@ static struct vio_device_id ibmvscsi_device_table[] __devinitdata = {
 
 MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table);
 static struct vio_driver ibmvscsi_driver = {
-       .name = "ibmvscsi",
        .id_table = ibmvscsi_device_table,
        .probe = ibmvscsi_probe,
-       .remove = ibmvscsi_remove
+       .remove = ibmvscsi_remove,
+       .driver = {
+               .name = "ibmvscsi",
+       }
 };
 
 int __init ibmvscsi_module_init(void)
index f10f72f24fde10a2ce73c514c6ab01326c838efe..104c58501d0ce0be0d8acfa03d512266359c7e52 100644 (file)
@@ -55,7 +55,6 @@ struct vio_dev {
 
 struct vio_driver {
        struct list_head node;
-       char *name;
        const struct vio_device_id *id_table;
        int (*probe)(struct vio_dev *dev, const struct vio_device_id *id);
        int (*remove)(struct vio_dev *dev);