aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-10-24 00:53:21 -0400
committerStephen Rothwell <sfr@canb.auug.org.au>2005-10-24 01:42:12 -0400
commit6fdf5392caa4c3cba65add0a4beec9f5eb96b723 (patch)
tree336ba343889a1d720e09477c2ea88cd5f99a67b9
parentf38d87f566195d78bd70538d5c774758f2d926d3 (diff)
powerpc: don't duplicate name between vio_driver and device_driver
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>
-rw-r--r--arch/powerpc/kernel/vio.c3
-rw-r--r--drivers/block/viodasd.c6
-rw-r--r--drivers/cdrom/viocd.c6
-rw-r--r--drivers/char/hvc_vio.c2
-rw-r--r--drivers/char/hvcs.c4
-rw-r--r--drivers/char/viotape.c6
-rw-r--r--drivers/net/ibmveth.c10
-rw-r--r--drivers/net/iseries_veth.c6
-rw-r--r--drivers/scsi/ibmvscsi/ibmvscsi.c6
-rw-r--r--include/asm-powerpc/vio.h1
10 files changed, 31 insertions, 19 deletions
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 0e555b7a6587..3aec492ec767 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -76,10 +76,9 @@ static int vio_bus_remove(struct device *dev)
76int vio_register_driver(struct vio_driver *viodrv) 76int vio_register_driver(struct vio_driver *viodrv)
77{ 77{
78 printk(KERN_DEBUG "%s: driver %s registering\n", __FUNCTION__, 78 printk(KERN_DEBUG "%s: driver %s registering\n", __FUNCTION__,
79 viodrv->name); 79 viodrv->driver.name);
80 80
81 /* fill in 'struct driver' fields */ 81 /* fill in 'struct driver' fields */
82 viodrv->driver.name = viodrv->name;
83 viodrv->driver.bus = &vio_bus_type; 82 viodrv->driver.bus = &vio_bus_type;
84 viodrv->driver.probe = vio_bus_probe; 83 viodrv->driver.probe = vio_bus_probe;
85 viodrv->driver.remove = vio_bus_remove; 84 viodrv->driver.remove = vio_bus_remove;
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
index e46ecd23b3ac..ea72faa83436 100644
--- a/drivers/block/viodasd.c
+++ b/drivers/block/viodasd.c
@@ -781,10 +781,12 @@ static struct vio_device_id viodasd_device_table[] __devinitdata = {
781 781
782MODULE_DEVICE_TABLE(vio, viodasd_device_table); 782MODULE_DEVICE_TABLE(vio, viodasd_device_table);
783static struct vio_driver viodasd_driver = { 783static struct vio_driver viodasd_driver = {
784 .name = "viodasd",
785 .id_table = viodasd_device_table, 784 .id_table = viodasd_device_table,
786 .probe = viodasd_probe, 785 .probe = viodasd_probe,
787 .remove = viodasd_remove 786 .remove = viodasd_remove,
787 .driver = {
788 .name = "viodasd",
789 }
788}; 790};
789 791
790/* 792/*
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
index 0829db58462f..255d24ad704b 100644
--- a/drivers/cdrom/viocd.c
+++ b/drivers/cdrom/viocd.c
@@ -739,10 +739,12 @@ static struct vio_device_id viocd_device_table[] __devinitdata = {
739 739
740MODULE_DEVICE_TABLE(vio, viocd_device_table); 740MODULE_DEVICE_TABLE(vio, viocd_device_table);
741static struct vio_driver viocd_driver = { 741static struct vio_driver viocd_driver = {
742 .name = "viocd",
743 .id_table = viocd_device_table, 742 .id_table = viocd_device_table,
744 .probe = viocd_probe, 743 .probe = viocd_probe,
745 .remove = viocd_remove 744 .remove = viocd_remove,
745 .driver = {
746 .name = "viocd",
747 }
746}; 748};
747 749
748static int __init viocd_init(void) 750static int __init viocd_init(void)
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c
index 78d681dc35a8..f5212eb2b41d 100644
--- a/drivers/char/hvc_vio.c
+++ b/drivers/char/hvc_vio.c
@@ -95,11 +95,11 @@ static int __devexit hvc_vio_remove(struct vio_dev *vdev)
95} 95}
96 96
97static struct vio_driver hvc_vio_driver = { 97static struct vio_driver hvc_vio_driver = {
98 .name = hvc_driver_name,
99 .id_table = hvc_driver_table, 98 .id_table = hvc_driver_table,
100 .probe = hvc_vio_probe, 99 .probe = hvc_vio_probe,
101 .remove = hvc_vio_remove, 100 .remove = hvc_vio_remove,
102 .driver = { 101 .driver = {
102 .name = hvc_driver_name,
103 .owner = THIS_MODULE, 103 .owner = THIS_MODULE,
104 } 104 }
105}; 105};
diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c
index f47f009f9259..8486298c011f 100644
--- a/drivers/char/hvcs.c
+++ b/drivers/char/hvcs.c
@@ -720,10 +720,12 @@ static int __devexit hvcs_remove(struct vio_dev *dev)
720}; 720};
721 721
722static struct vio_driver hvcs_vio_driver = { 722static struct vio_driver hvcs_vio_driver = {
723 .name = hvcs_driver_name,
724 .id_table = hvcs_driver_table, 723 .id_table = hvcs_driver_table,
725 .probe = hvcs_probe, 724 .probe = hvcs_probe,
726 .remove = hvcs_remove, 725 .remove = hvcs_remove,
726 .driver = {
727 .name = hvcs_driver_name,
728 }
727}; 729};
728 730
729/* Only called from hvcs_get_pi please */ 731/* Only called from hvcs_get_pi please */
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index 0aff45fac2e6..8fc1115c4b69 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -996,10 +996,12 @@ static struct vio_device_id viotape_device_table[] __devinitdata = {
996 996
997MODULE_DEVICE_TABLE(vio, viotape_device_table); 997MODULE_DEVICE_TABLE(vio, viotape_device_table);
998static struct vio_driver viotape_driver = { 998static struct vio_driver viotape_driver = {
999 .name = "viotape",
1000 .id_table = viotape_device_table, 999 .id_table = viotape_device_table,
1001 .probe = viotape_probe, 1000 .probe = viotape_probe,
1002 .remove = viotape_remove 1001 .remove = viotape_remove,
1002 .driver = {
1003 .name = "viotape",
1004 }
1003}; 1005};
1004 1006
1005 1007
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index a2c4dd4fb221..fcf6f2c76300 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -1150,10 +1150,12 @@ static struct vio_device_id ibmveth_device_table[] __devinitdata= {
1150MODULE_DEVICE_TABLE(vio, ibmveth_device_table); 1150MODULE_DEVICE_TABLE(vio, ibmveth_device_table);
1151 1151
1152static struct vio_driver ibmveth_driver = { 1152static struct vio_driver ibmveth_driver = {
1153 .name = (char *)ibmveth_driver_name, 1153 .id_table = ibmveth_device_table,
1154 .id_table = ibmveth_device_table, 1154 .probe = ibmveth_probe,
1155 .probe = ibmveth_probe, 1155 .remove = ibmveth_remove,
1156 .remove = ibmveth_remove 1156 .driver = {
1157 .name = ibmveth_driver_name,
1158 }
1157}; 1159};
1158 1160
1159static int __init ibmveth_module_init(void) 1161static int __init ibmveth_module_init(void)
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
index db3bc2f6f0fa..33613fe9556c 100644
--- a/drivers/net/iseries_veth.c
+++ b/drivers/net/iseries_veth.c
@@ -1648,10 +1648,12 @@ static struct vio_device_id veth_device_table[] __devinitdata = {
1648MODULE_DEVICE_TABLE(vio, veth_device_table); 1648MODULE_DEVICE_TABLE(vio, veth_device_table);
1649 1649
1650static struct vio_driver veth_driver = { 1650static struct vio_driver veth_driver = {
1651 .name = DRV_NAME,
1652 .id_table = veth_device_table, 1651 .id_table = veth_device_table,
1653 .probe = veth_probe, 1652 .probe = veth_probe,
1654 .remove = veth_remove 1653 .remove = veth_remove,
1654 .driver = {
1655 .name = DRV_NAME,
1656 }
1655}; 1657};
1656 1658
1657/* 1659/*
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index ff25210b00ba..965e5373538c 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -1546,10 +1546,12 @@ static struct vio_device_id ibmvscsi_device_table[] __devinitdata = {
1546 1546
1547MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table); 1547MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table);
1548static struct vio_driver ibmvscsi_driver = { 1548static struct vio_driver ibmvscsi_driver = {
1549 .name = "ibmvscsi",
1550 .id_table = ibmvscsi_device_table, 1549 .id_table = ibmvscsi_device_table,
1551 .probe = ibmvscsi_probe, 1550 .probe = ibmvscsi_probe,
1552 .remove = ibmvscsi_remove 1551 .remove = ibmvscsi_remove,
1552 .driver = {
1553 .name = "ibmvscsi",
1554 }
1553}; 1555};
1554 1556
1555int __init ibmvscsi_module_init(void) 1557int __init ibmvscsi_module_init(void)
diff --git a/include/asm-powerpc/vio.h b/include/asm-powerpc/vio.h
index f10f72f24fde..104c58501d0c 100644
--- a/include/asm-powerpc/vio.h
+++ b/include/asm-powerpc/vio.h
@@ -55,7 +55,6 @@ struct vio_dev {
55 55
56struct vio_driver { 56struct vio_driver {
57 struct list_head node; 57 struct list_head node;
58 char *name;
59 const struct vio_device_id *id_table; 58 const struct vio_device_id *id_table;
60 int (*probe)(struct vio_dev *dev, const struct vio_device_id *id); 59 int (*probe)(struct vio_dev *dev, const struct vio_device_id *id);
61 int (*remove)(struct vio_dev *dev); 60 int (*remove)(struct vio_dev *dev);