diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-10 01:21:49 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-10 20:27:13 -0500 |
commit | 1d6629b1561ad34a6e6d17ece00bd65e1bab3724 (patch) | |
tree | 61b5a5062aa797f5bfc1da0a7b3b9876ce3d2a21 /drivers/media/video/s5p-tv | |
parent | aa5fb974cf3a30162c9c426c507486f3c2ab54c5 (diff) |
[media] convert drivers/media/* to use module_platform_driver()
This patch converts the drivers in drivers/media/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: "Richard Röjfors" <richard.rojfors@pelagicore.com>
Cc: "Matti J. Aaltonen" <matti.j.aaltonen@nokia.com>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Manjunath Hadli <manjunath.hadli@ti.com>
Cc: Muralidharan Karicheri <m-karicheri2@ti.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Daniel Drake <dsd@laptop.org>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/s5p-tv')
-rw-r--r-- | drivers/media/video/s5p-tv/hdmi_drv.c | 26 | ||||
-rw-r--r-- | drivers/media/video/s5p-tv/sdo_drv.c | 22 |
2 files changed, 2 insertions, 46 deletions
diff --git a/drivers/media/video/s5p-tv/hdmi_drv.c b/drivers/media/video/s5p-tv/hdmi_drv.c index 8199288481f3..8b41a0410ab1 100644 --- a/drivers/media/video/s5p-tv/hdmi_drv.c +++ b/drivers/media/video/s5p-tv/hdmi_drv.c | |||
@@ -1016,28 +1016,4 @@ static struct platform_driver hdmi_driver __refdata = { | |||
1016 | } | 1016 | } |
1017 | }; | 1017 | }; |
1018 | 1018 | ||
1019 | /* D R I V E R I N I T I A L I Z A T I O N */ | 1019 | module_platform_driver(hdmi_driver); |
1020 | |||
1021 | static int __init hdmi_init(void) | ||
1022 | { | ||
1023 | int ret; | ||
1024 | static const char banner[] __initdata = KERN_INFO \ | ||
1025 | "Samsung HDMI output driver, " | ||
1026 | "(c) 2010-2011 Samsung Electronics Co., Ltd.\n"; | ||
1027 | printk(banner); | ||
1028 | |||
1029 | ret = platform_driver_register(&hdmi_driver); | ||
1030 | if (ret) | ||
1031 | printk(KERN_ERR "HDMI platform driver register failed\n"); | ||
1032 | |||
1033 | return ret; | ||
1034 | } | ||
1035 | module_init(hdmi_init); | ||
1036 | |||
1037 | static void __exit hdmi_exit(void) | ||
1038 | { | ||
1039 | platform_driver_unregister(&hdmi_driver); | ||
1040 | } | ||
1041 | module_exit(hdmi_exit); | ||
1042 | |||
1043 | |||
diff --git a/drivers/media/video/s5p-tv/sdo_drv.c b/drivers/media/video/s5p-tv/sdo_drv.c index 8cec67ef48c9..059e7749ce95 100644 --- a/drivers/media/video/s5p-tv/sdo_drv.c +++ b/drivers/media/video/s5p-tv/sdo_drv.c | |||
@@ -457,24 +457,4 @@ static struct platform_driver sdo_driver __refdata = { | |||
457 | } | 457 | } |
458 | }; | 458 | }; |
459 | 459 | ||
460 | static int __init sdo_init(void) | 460 | module_platform_driver(sdo_driver); |
461 | { | ||
462 | int ret; | ||
463 | static const char banner[] __initdata = KERN_INFO \ | ||
464 | "Samsung Standard Definition Output (SDO) driver, " | ||
465 | "(c) 2010-2011 Samsung Electronics Co., Ltd.\n"; | ||
466 | printk(banner); | ||
467 | |||
468 | ret = platform_driver_register(&sdo_driver); | ||
469 | if (ret) | ||
470 | printk(KERN_ERR "SDO platform driver register failed\n"); | ||
471 | |||
472 | return ret; | ||
473 | } | ||
474 | module_init(sdo_init); | ||
475 | |||
476 | static void __exit sdo_exit(void) | ||
477 | { | ||
478 | platform_driver_unregister(&sdo_driver); | ||
479 | } | ||
480 | module_exit(sdo_exit); | ||