Commit 6fdf5392 authored by Stephen Rothwell's avatar Stephen Rothwell

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: default avatarStephen Rothwell <sfr@canb.auug.org.au>
parent f38d87f5
...@@ -76,10 +76,9 @@ static int vio_bus_remove(struct device *dev) ...@@ -76,10 +76,9 @@ static int vio_bus_remove(struct device *dev)
int vio_register_driver(struct vio_driver *viodrv) int vio_register_driver(struct vio_driver *viodrv)
{ {
printk(KERN_DEBUG "%s: driver %s registering\n", __FUNCTION__, printk(KERN_DEBUG "%s: driver %s registering\n", __FUNCTION__,
viodrv->name); viodrv->driver.name);
/* fill in 'struct driver' fields */ /* fill in 'struct driver' fields */
viodrv->driver.name = viodrv->name;
viodrv->driver.bus = &vio_bus_type; viodrv->driver.bus = &vio_bus_type;
viodrv->driver.probe = vio_bus_probe; viodrv->driver.probe = vio_bus_probe;
viodrv->driver.remove = vio_bus_remove; viodrv->driver.remove = vio_bus_remove;
......
...@@ -781,10 +781,12 @@ static struct vio_device_id viodasd_device_table[] __devinitdata = { ...@@ -781,10 +781,12 @@ static struct vio_device_id viodasd_device_table[] __devinitdata = {
MODULE_DEVICE_TABLE(vio, viodasd_device_table); MODULE_DEVICE_TABLE(vio, viodasd_device_table);
static struct vio_driver viodasd_driver = { static struct vio_driver viodasd_driver = {
.name = "viodasd",
.id_table = viodasd_device_table, .id_table = viodasd_device_table,
.probe = viodasd_probe, .probe = viodasd_probe,
.remove = viodasd_remove .remove = viodasd_remove,
.driver = {
.name = "viodasd",
}
}; };
/* /*
......
...@@ -739,10 +739,12 @@ static struct vio_device_id viocd_device_table[] __devinitdata = { ...@@ -739,10 +739,12 @@ static struct vio_device_id viocd_device_table[] __devinitdata = {
MODULE_DEVICE_TABLE(vio, viocd_device_table); MODULE_DEVICE_TABLE(vio, viocd_device_table);
static struct vio_driver viocd_driver = { static struct vio_driver viocd_driver = {
.name = "viocd",
.id_table = viocd_device_table, .id_table = viocd_device_table,
.probe = viocd_probe, .probe = viocd_probe,
.remove = viocd_remove .remove = viocd_remove,
.driver = {
.name = "viocd",
}
}; };
static int __init viocd_init(void) static int __init viocd_init(void)
......
...@@ -95,11 +95,11 @@ static int __devexit hvc_vio_remove(struct vio_dev *vdev) ...@@ -95,11 +95,11 @@ static int __devexit hvc_vio_remove(struct vio_dev *vdev)
} }
static struct vio_driver hvc_vio_driver = { static struct vio_driver hvc_vio_driver = {
.name = hvc_driver_name,
.id_table = hvc_driver_table, .id_table = hvc_driver_table,
.probe = hvc_vio_probe, .probe = hvc_vio_probe,
.remove = hvc_vio_remove, .remove = hvc_vio_remove,
.driver = { .driver = {
.name = hvc_driver_name,
.owner = THIS_MODULE, .owner = THIS_MODULE,
} }
}; };
......
...@@ -720,10 +720,12 @@ static int __devexit hvcs_remove(struct vio_dev *dev) ...@@ -720,10 +720,12 @@ static int __devexit hvcs_remove(struct vio_dev *dev)
}; };
static struct vio_driver hvcs_vio_driver = { static struct vio_driver hvcs_vio_driver = {
.name = hvcs_driver_name,
.id_table = hvcs_driver_table, .id_table = hvcs_driver_table,
.probe = hvcs_probe, .probe = hvcs_probe,
.remove = hvcs_remove, .remove = hvcs_remove,
.driver = {
.name = hvcs_driver_name,
}
}; };
/* Only called from hvcs_get_pi please */ /* Only called from hvcs_get_pi please */
......
...@@ -996,10 +996,12 @@ static struct vio_device_id viotape_device_table[] __devinitdata = { ...@@ -996,10 +996,12 @@ static struct vio_device_id viotape_device_table[] __devinitdata = {
MODULE_DEVICE_TABLE(vio, viotape_device_table); MODULE_DEVICE_TABLE(vio, viotape_device_table);
static struct vio_driver viotape_driver = { static struct vio_driver viotape_driver = {
.name = "viotape",
.id_table = viotape_device_table, .id_table = viotape_device_table,
.probe = viotape_probe, .probe = viotape_probe,
.remove = viotape_remove .remove = viotape_remove,
.driver = {
.name = "viotape",
}
}; };
......
...@@ -1150,10 +1150,12 @@ static struct vio_device_id ibmveth_device_table[] __devinitdata= { ...@@ -1150,10 +1150,12 @@ static struct vio_device_id ibmveth_device_table[] __devinitdata= {
MODULE_DEVICE_TABLE(vio, ibmveth_device_table); MODULE_DEVICE_TABLE(vio, ibmveth_device_table);
static struct vio_driver ibmveth_driver = { static struct vio_driver ibmveth_driver = {
.name = (char *)ibmveth_driver_name,
.id_table = ibmveth_device_table, .id_table = ibmveth_device_table,
.probe = ibmveth_probe, .probe = ibmveth_probe,
.remove = ibmveth_remove .remove = ibmveth_remove,
.driver = {
.name = ibmveth_driver_name,
}
}; };
static int __init ibmveth_module_init(void) static int __init ibmveth_module_init(void)
......
...@@ -1648,10 +1648,12 @@ static struct vio_device_id veth_device_table[] __devinitdata = { ...@@ -1648,10 +1648,12 @@ static struct vio_device_id veth_device_table[] __devinitdata = {
MODULE_DEVICE_TABLE(vio, veth_device_table); MODULE_DEVICE_TABLE(vio, veth_device_table);
static struct vio_driver veth_driver = { static struct vio_driver veth_driver = {
.name = DRV_NAME,
.id_table = veth_device_table, .id_table = veth_device_table,
.probe = veth_probe, .probe = veth_probe,
.remove = veth_remove .remove = veth_remove,
.driver = {
.name = DRV_NAME,
}
}; };
/* /*
......
...@@ -1546,10 +1546,12 @@ static struct vio_device_id ibmvscsi_device_table[] __devinitdata = { ...@@ -1546,10 +1546,12 @@ static struct vio_device_id ibmvscsi_device_table[] __devinitdata = {
MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table); MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table);
static struct vio_driver ibmvscsi_driver = { static struct vio_driver ibmvscsi_driver = {
.name = "ibmvscsi",
.id_table = ibmvscsi_device_table, .id_table = ibmvscsi_device_table,
.probe = ibmvscsi_probe, .probe = ibmvscsi_probe,
.remove = ibmvscsi_remove .remove = ibmvscsi_remove,
.driver = {
.name = "ibmvscsi",
}
}; };
int __init ibmvscsi_module_init(void) int __init ibmvscsi_module_init(void)
......
...@@ -55,7 +55,6 @@ struct vio_dev { ...@@ -55,7 +55,6 @@ struct vio_dev {
struct vio_driver { struct vio_driver {
struct list_head node; struct list_head node;
char *name;
const struct vio_device_id *id_table; const struct vio_device_id *id_table;
int (*probe)(struct vio_dev *dev, const struct vio_device_id *id); int (*probe)(struct vio_dev *dev, const struct vio_device_id *id);
int (*remove)(struct vio_dev *dev); int (*remove)(struct vio_dev *dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment