aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/hvc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-03-26 15:06:30 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-03-27 20:33:24 -0400
commitcb52d8970eee65bf2c47d9a91bd4f58b17f595f4 (patch)
tree43521ba99805f293e09a284901cb5435afeab789 /drivers/tty/hvc
parent1d9a47315042606b4217691bcea36cfa6ccbde66 (diff)
powerpc+sparc/vio: Modernize driver registration
This makes vio_register_driver() get the module owner & name at compile time like PCI drivers do, and adds a name pointer directly in struct vio_driver to avoid having to explicitly initialize the embedded struct device. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/tty/hvc')
-rw-r--r--drivers/tty/hvc/hvc_vio.c7
-rw-r--r--drivers/tty/hvc/hvcs.c5
2 files changed, 3 insertions, 9 deletions
diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c
index 3a0d53d6368f..ee307799271a 100644
--- a/drivers/tty/hvc/hvc_vio.c
+++ b/drivers/tty/hvc/hvc_vio.c
@@ -310,11 +310,8 @@ static int __devexit hvc_vio_remove(struct vio_dev *vdev)
310static struct vio_driver hvc_vio_driver = { 310static struct vio_driver hvc_vio_driver = {
311 .id_table = hvc_driver_table, 311 .id_table = hvc_driver_table,
312 .probe = hvc_vio_probe, 312 .probe = hvc_vio_probe,
313 .remove = __devexit_p(hvc_vio_remove), 313 .remove = hvc_vio_remove,
314 .driver = { 314 .name = hvc_driver_name,
315 .name = hvc_driver_name,
316 .owner = THIS_MODULE,
317 }
318}; 315};
319 316
320static int __init hvc_vio_init(void) 317static int __init hvc_vio_init(void)
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index d23759183b47..3436436fe2d7 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -879,10 +879,7 @@ static struct vio_driver hvcs_vio_driver = {
879 .id_table = hvcs_driver_table, 879 .id_table = hvcs_driver_table,
880 .probe = hvcs_probe, 880 .probe = hvcs_probe,
881 .remove = __devexit_p(hvcs_remove), 881 .remove = __devexit_p(hvcs_remove),
882 .driver = { 882 .name = hvcs_driver_name,
883 .name = hvcs_driver_name,
884 .owner = THIS_MODULE,
885 }
886}; 883};
887 884
888/* Only called from hvcs_get_pi please */ 885/* Only called from hvcs_get_pi please */