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 | |
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')
25 files changed, 26 insertions, 406 deletions
diff --git a/drivers/media/radio/radio-si4713.c b/drivers/media/radio/radio-si4713.c index d1fab5885061..c54210c7fef9 100644 --- a/drivers/media/radio/radio-si4713.c +++ b/drivers/media/radio/radio-si4713.c | |||
@@ -355,17 +355,4 @@ static struct platform_driver radio_si4713_pdriver = { | |||
355 | .remove = __exit_p(radio_si4713_pdriver_remove), | 355 | .remove = __exit_p(radio_si4713_pdriver_remove), |
356 | }; | 356 | }; |
357 | 357 | ||
358 | /* Module Interface */ | 358 | module_platform_driver(radio_si4713_pdriver); |
359 | static int __init radio_si4713_module_init(void) | ||
360 | { | ||
361 | return platform_driver_register(&radio_si4713_pdriver); | ||
362 | } | ||
363 | |||
364 | static void __exit radio_si4713_module_exit(void) | ||
365 | { | ||
366 | platform_driver_unregister(&radio_si4713_pdriver); | ||
367 | } | ||
368 | |||
369 | module_init(radio_si4713_module_init); | ||
370 | module_exit(radio_si4713_module_exit); | ||
371 | |||
diff --git a/drivers/media/radio/radio-timb.c b/drivers/media/radio/radio-timb.c index 3e9209f84e09..5d9a90ac3a1c 100644 --- a/drivers/media/radio/radio-timb.c +++ b/drivers/media/radio/radio-timb.c | |||
@@ -226,20 +226,7 @@ static struct platform_driver timbradio_platform_driver = { | |||
226 | .remove = timbradio_remove, | 226 | .remove = timbradio_remove, |
227 | }; | 227 | }; |
228 | 228 | ||
229 | /*--------------------------------------------------------------------------*/ | 229 | module_platform_driver(timbradio_platform_driver); |
230 | |||
231 | static int __init timbradio_init(void) | ||
232 | { | ||
233 | return platform_driver_register(&timbradio_platform_driver); | ||
234 | } | ||
235 | |||
236 | static void __exit timbradio_exit(void) | ||
237 | { | ||
238 | platform_driver_unregister(&timbradio_platform_driver); | ||
239 | } | ||
240 | |||
241 | module_init(timbradio_init); | ||
242 | module_exit(timbradio_exit); | ||
243 | 230 | ||
244 | MODULE_DESCRIPTION("Timberdale Radio driver"); | 231 | MODULE_DESCRIPTION("Timberdale Radio driver"); |
245 | MODULE_AUTHOR("Mocean Laboratories <info@mocean-labs.com>"); | 232 | MODULE_AUTHOR("Mocean Laboratories <info@mocean-labs.com>"); |
diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c index 8aa4968d57bc..f1b607099b6c 100644 --- a/drivers/media/radio/radio-wl1273.c +++ b/drivers/media/radio/radio-wl1273.c | |||
@@ -2148,8 +2148,6 @@ pdata_err: | |||
2148 | return r; | 2148 | return r; |
2149 | } | 2149 | } |
2150 | 2150 | ||
2151 | MODULE_ALIAS("platform:wl1273_fm_radio"); | ||
2152 | |||
2153 | static struct platform_driver wl1273_fm_radio_driver = { | 2151 | static struct platform_driver wl1273_fm_radio_driver = { |
2154 | .probe = wl1273_fm_radio_probe, | 2152 | .probe = wl1273_fm_radio_probe, |
2155 | .remove = __devexit_p(wl1273_fm_radio_remove), | 2153 | .remove = __devexit_p(wl1273_fm_radio_remove), |
@@ -2159,20 +2157,9 @@ static struct platform_driver wl1273_fm_radio_driver = { | |||
2159 | }, | 2157 | }, |
2160 | }; | 2158 | }; |
2161 | 2159 | ||
2162 | static int __init wl1273_fm_module_init(void) | 2160 | module_platform_driver(wl1273_fm_radio_driver); |
2163 | { | ||
2164 | pr_info("%s\n", __func__); | ||
2165 | return platform_driver_register(&wl1273_fm_radio_driver); | ||
2166 | } | ||
2167 | module_init(wl1273_fm_module_init); | ||
2168 | |||
2169 | static void __exit wl1273_fm_module_exit(void) | ||
2170 | { | ||
2171 | platform_driver_unregister(&wl1273_fm_radio_driver); | ||
2172 | pr_info(DRIVER_DESC ", Exiting.\n"); | ||
2173 | } | ||
2174 | module_exit(wl1273_fm_module_exit); | ||
2175 | 2161 | ||
2176 | MODULE_AUTHOR("Matti Aaltonen <matti.j.aaltonen@nokia.com>"); | 2162 | MODULE_AUTHOR("Matti Aaltonen <matti.j.aaltonen@nokia.com>"); |
2177 | MODULE_DESCRIPTION(DRIVER_DESC); | 2163 | MODULE_DESCRIPTION(DRIVER_DESC); |
2178 | MODULE_LICENSE("GPL"); | 2164 | MODULE_LICENSE("GPL"); |
2165 | MODULE_ALIAS("platform:wl1273_fm_radio"); | ||
diff --git a/drivers/media/video/davinci/dm355_ccdc.c b/drivers/media/video/davinci/dm355_ccdc.c index bd443ee76fff..f83baf3a52b0 100644 --- a/drivers/media/video/davinci/dm355_ccdc.c +++ b/drivers/media/video/davinci/dm355_ccdc.c | |||
@@ -1069,15 +1069,4 @@ static struct platform_driver dm355_ccdc_driver = { | |||
1069 | .probe = dm355_ccdc_probe, | 1069 | .probe = dm355_ccdc_probe, |
1070 | }; | 1070 | }; |
1071 | 1071 | ||
1072 | static int __init dm355_ccdc_init(void) | 1072 | module_platform_driver(dm355_ccdc_driver); |
1073 | { | ||
1074 | return platform_driver_register(&dm355_ccdc_driver); | ||
1075 | } | ||
1076 | |||
1077 | static void __exit dm355_ccdc_exit(void) | ||
1078 | { | ||
1079 | platform_driver_unregister(&dm355_ccdc_driver); | ||
1080 | } | ||
1081 | |||
1082 | module_init(dm355_ccdc_init); | ||
1083 | module_exit(dm355_ccdc_exit); | ||
diff --git a/drivers/media/video/davinci/dm644x_ccdc.c b/drivers/media/video/davinci/dm644x_ccdc.c index 8051c2956478..9303fe553b07 100644 --- a/drivers/media/video/davinci/dm644x_ccdc.c +++ b/drivers/media/video/davinci/dm644x_ccdc.c | |||
@@ -1078,15 +1078,4 @@ static struct platform_driver dm644x_ccdc_driver = { | |||
1078 | .probe = dm644x_ccdc_probe, | 1078 | .probe = dm644x_ccdc_probe, |
1079 | }; | 1079 | }; |
1080 | 1080 | ||
1081 | static int __init dm644x_ccdc_init(void) | 1081 | module_platform_driver(dm644x_ccdc_driver); |
1082 | { | ||
1083 | return platform_driver_register(&dm644x_ccdc_driver); | ||
1084 | } | ||
1085 | |||
1086 | static void __exit dm644x_ccdc_exit(void) | ||
1087 | { | ||
1088 | platform_driver_unregister(&dm644x_ccdc_driver); | ||
1089 | } | ||
1090 | |||
1091 | module_init(dm644x_ccdc_init); | ||
1092 | module_exit(dm644x_ccdc_exit); | ||
diff --git a/drivers/media/video/davinci/isif.c b/drivers/media/video/davinci/isif.c index 29c29c668596..1e63852374be 100644 --- a/drivers/media/video/davinci/isif.c +++ b/drivers/media/video/davinci/isif.c | |||
@@ -1156,17 +1156,6 @@ static struct platform_driver isif_driver = { | |||
1156 | .probe = isif_probe, | 1156 | .probe = isif_probe, |
1157 | }; | 1157 | }; |
1158 | 1158 | ||
1159 | static int __init isif_init(void) | 1159 | module_platform_driver(isif_driver); |
1160 | { | ||
1161 | return platform_driver_register(&isif_driver); | ||
1162 | } | ||
1163 | |||
1164 | static void isif_exit(void) | ||
1165 | { | ||
1166 | platform_driver_unregister(&isif_driver); | ||
1167 | } | ||
1168 | |||
1169 | module_init(isif_init); | ||
1170 | module_exit(isif_exit); | ||
1171 | 1160 | ||
1172 | MODULE_LICENSE("GPL"); | 1161 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/media/video/davinci/vpbe.c b/drivers/media/video/davinci/vpbe.c index 1cc254d52a41..c4a82a1a8a97 100644 --- a/drivers/media/video/davinci/vpbe.c +++ b/drivers/media/video/davinci/vpbe.c | |||
@@ -883,26 +883,4 @@ static struct platform_driver vpbe_driver = { | |||
883 | .remove = vpbe_remove, | 883 | .remove = vpbe_remove, |
884 | }; | 884 | }; |
885 | 885 | ||
886 | /** | 886 | module_platform_driver(vpbe_driver); |
887 | * vpbe_init: initialize the vpbe driver | ||
888 | * | ||
889 | * This function registers device and driver to the kernel | ||
890 | */ | ||
891 | static __init int vpbe_init(void) | ||
892 | { | ||
893 | return platform_driver_register(&vpbe_driver); | ||
894 | } | ||
895 | |||
896 | /** | ||
897 | * vpbe_cleanup : cleanup function for vpbe driver | ||
898 | * | ||
899 | * This will un-registers the device and driver to the kernel | ||
900 | */ | ||
901 | static void vpbe_cleanup(void) | ||
902 | { | ||
903 | platform_driver_unregister(&vpbe_driver); | ||
904 | } | ||
905 | |||
906 | /* Function for module initialization and cleanup */ | ||
907 | module_init(vpbe_init); | ||
908 | module_exit(vpbe_cleanup); | ||
diff --git a/drivers/media/video/davinci/vpbe_display.c b/drivers/media/video/davinci/vpbe_display.c index d98da4bfb256..1f3b1c729252 100644 --- a/drivers/media/video/davinci/vpbe_display.c +++ b/drivers/media/video/davinci/vpbe_display.c | |||
@@ -1817,43 +1817,7 @@ static struct platform_driver vpbe_display_driver = { | |||
1817 | .remove = __devexit_p(vpbe_display_remove), | 1817 | .remove = __devexit_p(vpbe_display_remove), |
1818 | }; | 1818 | }; |
1819 | 1819 | ||
1820 | /* | 1820 | module_platform_driver(vpbe_display_driver); |
1821 | * vpbe_display_init() | ||
1822 | * This function registers device and driver to the kernel, requests irq | ||
1823 | * handler and allocates memory for layer objects | ||
1824 | */ | ||
1825 | static __devinit int vpbe_display_init(void) | ||
1826 | { | ||
1827 | int err; | ||
1828 | |||
1829 | printk(KERN_DEBUG "vpbe_display_init\n"); | ||
1830 | |||
1831 | /* Register driver to the kernel */ | ||
1832 | err = platform_driver_register(&vpbe_display_driver); | ||
1833 | if (0 != err) | ||
1834 | return err; | ||
1835 | |||
1836 | printk(KERN_DEBUG "vpbe_display_init:" | ||
1837 | "VPBE V4L2 Display Driver V1.0 loaded\n"); | ||
1838 | return 0; | ||
1839 | } | ||
1840 | |||
1841 | /* | ||
1842 | * vpbe_display_cleanup() | ||
1843 | * This function un-registers device and driver to the kernel, frees requested | ||
1844 | * irq handler and de-allocates memory allocated for layer objects. | ||
1845 | */ | ||
1846 | static void vpbe_display_cleanup(void) | ||
1847 | { | ||
1848 | printk(KERN_DEBUG "vpbe_display_cleanup\n"); | ||
1849 | |||
1850 | /* platform driver unregister */ | ||
1851 | platform_driver_unregister(&vpbe_display_driver); | ||
1852 | } | ||
1853 | |||
1854 | /* Function for module initialization and cleanup */ | ||
1855 | module_init(vpbe_display_init); | ||
1856 | module_exit(vpbe_display_cleanup); | ||
1857 | 1821 | ||
1858 | MODULE_DESCRIPTION("TI DM644x/DM355/DM365 VPBE Display controller"); | 1822 | MODULE_DESCRIPTION("TI DM644x/DM355/DM365 VPBE Display controller"); |
1859 | MODULE_LICENSE("GPL"); | 1823 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/media/video/davinci/vpbe_osd.c b/drivers/media/video/davinci/vpbe_osd.c index feeec2256c48..d6488b79ae3b 100644 --- a/drivers/media/video/davinci/vpbe_osd.c +++ b/drivers/media/video/davinci/vpbe_osd.c | |||
@@ -1599,23 +1599,7 @@ static struct platform_driver osd_driver = { | |||
1599 | }, | 1599 | }, |
1600 | }; | 1600 | }; |
1601 | 1601 | ||
1602 | static int osd_init(void) | 1602 | module_platform_driver(osd_driver); |
1603 | { | ||
1604 | if (platform_driver_register(&osd_driver)) { | ||
1605 | printk(KERN_ERR "Unable to register davinci osd driver\n"); | ||
1606 | return -ENODEV; | ||
1607 | } | ||
1608 | |||
1609 | return 0; | ||
1610 | } | ||
1611 | |||
1612 | static void osd_exit(void) | ||
1613 | { | ||
1614 | platform_driver_unregister(&osd_driver); | ||
1615 | } | ||
1616 | |||
1617 | module_init(osd_init); | ||
1618 | module_exit(osd_exit); | ||
1619 | 1603 | ||
1620 | MODULE_LICENSE("GPL"); | 1604 | MODULE_LICENSE("GPL"); |
1621 | MODULE_DESCRIPTION("DaVinci OSD Manager Driver"); | 1605 | MODULE_DESCRIPTION("DaVinci OSD Manager Driver"); |
diff --git a/drivers/media/video/davinci/vpbe_venc.c b/drivers/media/video/davinci/vpbe_venc.c index 53c29943e91f..00e80f59d5d5 100644 --- a/drivers/media/video/davinci/vpbe_venc.c +++ b/drivers/media/video/davinci/vpbe_venc.c | |||
@@ -700,23 +700,7 @@ static struct platform_driver venc_driver = { | |||
700 | }, | 700 | }, |
701 | }; | 701 | }; |
702 | 702 | ||
703 | static int venc_init(void) | 703 | module_platform_driver(venc_driver); |
704 | { | ||
705 | if (platform_driver_register(&venc_driver)) { | ||
706 | printk(KERN_ERR "Unable to register venc driver\n"); | ||
707 | return -ENODEV; | ||
708 | } | ||
709 | return 0; | ||
710 | } | ||
711 | |||
712 | static void venc_exit(void) | ||
713 | { | ||
714 | platform_driver_unregister(&venc_driver); | ||
715 | return; | ||
716 | } | ||
717 | |||
718 | module_init(venc_init); | ||
719 | module_exit(venc_exit); | ||
720 | 704 | ||
721 | MODULE_LICENSE("GPL"); | 705 | MODULE_LICENSE("GPL"); |
722 | MODULE_DESCRIPTION("VPBE VENC Driver"); | 706 | MODULE_DESCRIPTION("VPBE VENC Driver"); |
diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index 5b38fc93ff28..20cf271a774b 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c | |||
@@ -2076,20 +2076,4 @@ static struct platform_driver vpfe_driver = { | |||
2076 | .remove = __devexit_p(vpfe_remove), | 2076 | .remove = __devexit_p(vpfe_remove), |
2077 | }; | 2077 | }; |
2078 | 2078 | ||
2079 | static __init int vpfe_init(void) | 2079 | module_platform_driver(vpfe_driver); |
2080 | { | ||
2081 | printk(KERN_NOTICE "vpfe_init\n"); | ||
2082 | /* Register driver to the kernel */ | ||
2083 | return platform_driver_register(&vpfe_driver); | ||
2084 | } | ||
2085 | |||
2086 | /* | ||
2087 | * vpfe_cleanup : This function un-registers device driver | ||
2088 | */ | ||
2089 | static void vpfe_cleanup(void) | ||
2090 | { | ||
2091 | platform_driver_unregister(&vpfe_driver); | ||
2092 | } | ||
2093 | |||
2094 | module_init(vpfe_init); | ||
2095 | module_exit(vpfe_cleanup); | ||
diff --git a/drivers/media/video/fsl-viu.c b/drivers/media/video/fsl-viu.c index 27cb197d0bd6..27e3e0c0b219 100644 --- a/drivers/media/video/fsl-viu.c +++ b/drivers/media/video/fsl-viu.c | |||
@@ -1661,18 +1661,7 @@ static struct platform_driver viu_of_platform_driver = { | |||
1661 | }, | 1661 | }, |
1662 | }; | 1662 | }; |
1663 | 1663 | ||
1664 | static int __init viu_init(void) | 1664 | module_platform_driver(viu_of_platform_driver); |
1665 | { | ||
1666 | return platform_driver_register(&viu_of_platform_driver); | ||
1667 | } | ||
1668 | |||
1669 | static void __exit viu_exit(void) | ||
1670 | { | ||
1671 | platform_driver_unregister(&viu_of_platform_driver); | ||
1672 | } | ||
1673 | |||
1674 | module_init(viu_init); | ||
1675 | module_exit(viu_exit); | ||
1676 | 1665 | ||
1677 | MODULE_DESCRIPTION("Freescale Video-In(VIU)"); | 1666 | MODULE_DESCRIPTION("Freescale Video-In(VIU)"); |
1678 | MODULE_AUTHOR("Hongjun Chen"); | 1667 | MODULE_AUTHOR("Hongjun Chen"); |
diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c index ba004747ff01..0cb461dd396a 100644 --- a/drivers/media/video/mx3_camera.c +++ b/drivers/media/video/mx3_camera.c | |||
@@ -1286,19 +1286,7 @@ static struct platform_driver mx3_camera_driver = { | |||
1286 | .remove = __devexit_p(mx3_camera_remove), | 1286 | .remove = __devexit_p(mx3_camera_remove), |
1287 | }; | 1287 | }; |
1288 | 1288 | ||
1289 | 1289 | module_platform_driver(mx3_camera_driver); | |
1290 | static int __init mx3_camera_init(void) | ||
1291 | { | ||
1292 | return platform_driver_register(&mx3_camera_driver); | ||
1293 | } | ||
1294 | |||
1295 | static void __exit mx3_camera_exit(void) | ||
1296 | { | ||
1297 | platform_driver_unregister(&mx3_camera_driver); | ||
1298 | } | ||
1299 | |||
1300 | module_init(mx3_camera_init); | ||
1301 | module_exit(mx3_camera_exit); | ||
1302 | 1290 | ||
1303 | MODULE_DESCRIPTION("i.MX3x SoC Camera Host driver"); | 1291 | MODULE_DESCRIPTION("i.MX3x SoC Camera Host driver"); |
1304 | MODULE_AUTHOR("Guennadi Liakhovetski <lg@denx.de>"); | 1292 | MODULE_AUTHOR("Guennadi Liakhovetski <lg@denx.de>"); |
diff --git a/drivers/media/video/omap1_camera.c b/drivers/media/video/omap1_camera.c index 946ee55c018a..c20f5ecd6790 100644 --- a/drivers/media/video/omap1_camera.c +++ b/drivers/media/video/omap1_camera.c | |||
@@ -1713,17 +1713,7 @@ static struct platform_driver omap1_cam_driver = { | |||
1713 | .remove = __exit_p(omap1_cam_remove), | 1713 | .remove = __exit_p(omap1_cam_remove), |
1714 | }; | 1714 | }; |
1715 | 1715 | ||
1716 | static int __init omap1_cam_init(void) | 1716 | module_platform_driver(omap1_cam_driver); |
1717 | { | ||
1718 | return platform_driver_register(&omap1_cam_driver); | ||
1719 | } | ||
1720 | module_init(omap1_cam_init); | ||
1721 | |||
1722 | static void __exit omap1_cam_exit(void) | ||
1723 | { | ||
1724 | platform_driver_unregister(&omap1_cam_driver); | ||
1725 | } | ||
1726 | module_exit(omap1_cam_exit); | ||
1727 | 1717 | ||
1728 | module_param(sg_mode, bool, 0644); | 1718 | module_param(sg_mode, bool, 0644); |
1729 | MODULE_PARM_DESC(sg_mode, "videobuf mode, 0: dma-contig (default), 1: dma-sg"); | 1719 | MODULE_PARM_DESC(sg_mode, "videobuf mode, 0: dma-contig (default), 1: dma-sg"); |
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c index 45522e603185..7d3864144368 100644 --- a/drivers/media/video/omap24xxcam.c +++ b/drivers/media/video/omap24xxcam.c | |||
@@ -1868,21 +1868,7 @@ static struct platform_driver omap24xxcam_driver = { | |||
1868 | }, | 1868 | }, |
1869 | }; | 1869 | }; |
1870 | 1870 | ||
1871 | /* | 1871 | module_platform_driver(omap24xxcam_driver); |
1872 | * | ||
1873 | * Module initialisation and deinitialisation | ||
1874 | * | ||
1875 | */ | ||
1876 | |||
1877 | static int __init omap24xxcam_init(void) | ||
1878 | { | ||
1879 | return platform_driver_register(&omap24xxcam_driver); | ||
1880 | } | ||
1881 | |||
1882 | static void __exit omap24xxcam_cleanup(void) | ||
1883 | { | ||
1884 | platform_driver_unregister(&omap24xxcam_driver); | ||
1885 | } | ||
1886 | 1872 | ||
1887 | MODULE_AUTHOR("Sakari Ailus <sakari.ailus@nokia.com>"); | 1873 | MODULE_AUTHOR("Sakari Ailus <sakari.ailus@nokia.com>"); |
1888 | MODULE_DESCRIPTION("OMAP24xx Video for Linux camera driver"); | 1874 | MODULE_DESCRIPTION("OMAP24xx Video for Linux camera driver"); |
@@ -1894,6 +1880,3 @@ MODULE_PARM_DESC(video_nr, | |||
1894 | module_param(capture_mem, int, 0); | 1880 | module_param(capture_mem, int, 0); |
1895 | MODULE_PARM_DESC(capture_mem, "Maximum amount of memory for capture " | 1881 | MODULE_PARM_DESC(capture_mem, "Maximum amount of memory for capture " |
1896 | "buffers (default 4800kiB)"); | 1882 | "buffers (default 4800kiB)"); |
1897 | |||
1898 | module_init(omap24xxcam_init); | ||
1899 | module_exit(omap24xxcam_cleanup); | ||
diff --git a/drivers/media/video/omap3isp/isp.c b/drivers/media/video/omap3isp/isp.c index 5cc15ba6a76a..faf1650e8747 100644 --- a/drivers/media/video/omap3isp/isp.c +++ b/drivers/media/video/omap3isp/isp.c | |||
@@ -2247,24 +2247,7 @@ static struct platform_driver omap3isp_driver = { | |||
2247 | }, | 2247 | }, |
2248 | }; | 2248 | }; |
2249 | 2249 | ||
2250 | /* | 2250 | module_platform_driver(omap3isp_driver); |
2251 | * isp_init - ISP module initialization. | ||
2252 | */ | ||
2253 | static int __init isp_init(void) | ||
2254 | { | ||
2255 | return platform_driver_register(&omap3isp_driver); | ||
2256 | } | ||
2257 | |||
2258 | /* | ||
2259 | * isp_cleanup - ISP module cleanup. | ||
2260 | */ | ||
2261 | static void __exit isp_cleanup(void) | ||
2262 | { | ||
2263 | platform_driver_unregister(&omap3isp_driver); | ||
2264 | } | ||
2265 | |||
2266 | module_init(isp_init); | ||
2267 | module_exit(isp_cleanup); | ||
2268 | 2251 | ||
2269 | MODULE_AUTHOR("Nokia Corporation"); | 2252 | MODULE_AUTHOR("Nokia Corporation"); |
2270 | MODULE_DESCRIPTION("TI OMAP3 ISP driver"); | 2253 | MODULE_DESCRIPTION("TI OMAP3 ISP driver"); |
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 2f9ae634b7cf..0bd7da26d018 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -1852,19 +1852,7 @@ static struct platform_driver pxa_camera_driver = { | |||
1852 | .remove = __devexit_p(pxa_camera_remove), | 1852 | .remove = __devexit_p(pxa_camera_remove), |
1853 | }; | 1853 | }; |
1854 | 1854 | ||
1855 | 1855 | module_platform_driver(pxa_camera_driver); | |
1856 | static int __init pxa_camera_init(void) | ||
1857 | { | ||
1858 | return platform_driver_register(&pxa_camera_driver); | ||
1859 | } | ||
1860 | |||
1861 | static void __exit pxa_camera_exit(void) | ||
1862 | { | ||
1863 | platform_driver_unregister(&pxa_camera_driver); | ||
1864 | } | ||
1865 | |||
1866 | module_init(pxa_camera_init); | ||
1867 | module_exit(pxa_camera_exit); | ||
1868 | 1856 | ||
1869 | MODULE_DESCRIPTION("PXA27x SoC Camera Host driver"); | 1857 | MODULE_DESCRIPTION("PXA27x SoC Camera Host driver"); |
1870 | MODULE_AUTHOR("Guennadi Liakhovetski <kernel@pengutronix.de>"); | 1858 | MODULE_AUTHOR("Guennadi Liakhovetski <kernel@pengutronix.de>"); |
diff --git a/drivers/media/video/s5p-g2d/g2d.c b/drivers/media/video/s5p-g2d/g2d.c index 1f156c8fe63e..c40b0dde1883 100644 --- a/drivers/media/video/s5p-g2d/g2d.c +++ b/drivers/media/video/s5p-g2d/g2d.c | |||
@@ -803,21 +803,7 @@ static struct platform_driver g2d_pdrv = { | |||
803 | }, | 803 | }, |
804 | }; | 804 | }; |
805 | 805 | ||
806 | static void __exit g2d_exit(void) | 806 | module_platform_driver(g2d_pdrv); |
807 | { | ||
808 | platform_driver_unregister(&g2d_pdrv); | ||
809 | }; | ||
810 | |||
811 | static int __init g2d_init(void) | ||
812 | { | ||
813 | int ret = 0; | ||
814 | |||
815 | ret = platform_driver_register(&g2d_pdrv); | ||
816 | return ret; | ||
817 | }; | ||
818 | |||
819 | module_init(g2d_init); | ||
820 | module_exit(g2d_exit); | ||
821 | 807 | ||
822 | MODULE_AUTHOR("Kamil Debski <k.debski@samsung.com>"); | 808 | MODULE_AUTHOR("Kamil Debski <k.debski@samsung.com>"); |
823 | MODULE_DESCRIPTION("S5P G2D 2d graphics accelerator driver"); | 809 | MODULE_DESCRIPTION("S5P G2D 2d graphics accelerator driver"); |
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc.c b/drivers/media/video/s5p-mfc/s5p_mfc.c index 8be8b54eb749..e43e128baf5f 100644 --- a/drivers/media/video/s5p-mfc/s5p_mfc.c +++ b/drivers/media/video/s5p-mfc/s5p_mfc.c | |||
@@ -1245,27 +1245,7 @@ static struct platform_driver s5p_mfc_driver = { | |||
1245 | }, | 1245 | }, |
1246 | }; | 1246 | }; |
1247 | 1247 | ||
1248 | static char banner[] __initdata = | 1248 | module_platform_driver(s5p_mfc_driver); |
1249 | "S5P MFC V4L2 Driver, (C) 2011 Samsung Electronics\n"; | ||
1250 | |||
1251 | static int __init s5p_mfc_init(void) | ||
1252 | { | ||
1253 | int ret; | ||
1254 | |||
1255 | pr_info("%s", banner); | ||
1256 | ret = platform_driver_register(&s5p_mfc_driver); | ||
1257 | if (ret) | ||
1258 | pr_err("Platform device registration failed.\n"); | ||
1259 | return ret; | ||
1260 | } | ||
1261 | |||
1262 | static void __exit s5p_mfc_exit(void) | ||
1263 | { | ||
1264 | platform_driver_unregister(&s5p_mfc_driver); | ||
1265 | } | ||
1266 | |||
1267 | module_init(s5p_mfc_init); | ||
1268 | module_exit(s5p_mfc_exit); | ||
1269 | 1249 | ||
1270 | MODULE_LICENSE("GPL"); | 1250 | MODULE_LICENSE("GPL"); |
1271 | MODULE_AUTHOR("Kamil Debski <k.debski@samsung.com>"); | 1251 | MODULE_AUTHOR("Kamil Debski <k.debski@samsung.com>"); |
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); | ||
diff --git a/drivers/media/video/sh_mobile_csi2.c b/drivers/media/video/sh_mobile_csi2.c index 8a652b53ff7e..05286500b4d4 100644 --- a/drivers/media/video/sh_mobile_csi2.c +++ b/drivers/media/video/sh_mobile_csi2.c | |||
@@ -390,18 +390,7 @@ static struct platform_driver __refdata sh_csi2_pdrv = { | |||
390 | }, | 390 | }, |
391 | }; | 391 | }; |
392 | 392 | ||
393 | static int __init sh_csi2_init(void) | 393 | module_platform_driver(sh_csi2_pdrv); |
394 | { | ||
395 | return platform_driver_register(&sh_csi2_pdrv); | ||
396 | } | ||
397 | |||
398 | static void __exit sh_csi2_exit(void) | ||
399 | { | ||
400 | platform_driver_unregister(&sh_csi2_pdrv); | ||
401 | } | ||
402 | |||
403 | module_init(sh_csi2_init); | ||
404 | module_exit(sh_csi2_exit); | ||
405 | 394 | ||
406 | MODULE_DESCRIPTION("SH-Mobile MIPI CSI-2 driver"); | 395 | MODULE_DESCRIPTION("SH-Mobile MIPI CSI-2 driver"); |
407 | MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>"); | 396 | MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>"); |
diff --git a/drivers/media/video/soc_camera_platform.c b/drivers/media/video/soc_camera_platform.c index 4402a8a74f7a..f59ccade07c8 100644 --- a/drivers/media/video/soc_camera_platform.c +++ b/drivers/media/video/soc_camera_platform.c | |||
@@ -189,18 +189,7 @@ static struct platform_driver soc_camera_platform_driver = { | |||
189 | .remove = soc_camera_platform_remove, | 189 | .remove = soc_camera_platform_remove, |
190 | }; | 190 | }; |
191 | 191 | ||
192 | static int __init soc_camera_platform_module_init(void) | 192 | module_platform_driver(soc_camera_platform_driver); |
193 | { | ||
194 | return platform_driver_register(&soc_camera_platform_driver); | ||
195 | } | ||
196 | |||
197 | static void __exit soc_camera_platform_module_exit(void) | ||
198 | { | ||
199 | platform_driver_unregister(&soc_camera_platform_driver); | ||
200 | } | ||
201 | |||
202 | module_init(soc_camera_platform_module_init); | ||
203 | module_exit(soc_camera_platform_module_exit); | ||
204 | 193 | ||
205 | MODULE_DESCRIPTION("SoC Camera Platform driver"); | 194 | MODULE_DESCRIPTION("SoC Camera Platform driver"); |
206 | MODULE_AUTHOR("Magnus Damm"); | 195 | MODULE_AUTHOR("Magnus Damm"); |
diff --git a/drivers/media/video/timblogiw.c b/drivers/media/video/timblogiw.c index a0895bf07487..0a2d75f04066 100644 --- a/drivers/media/video/timblogiw.c +++ b/drivers/media/video/timblogiw.c | |||
@@ -872,20 +872,7 @@ static struct platform_driver timblogiw_platform_driver = { | |||
872 | .remove = __devexit_p(timblogiw_remove), | 872 | .remove = __devexit_p(timblogiw_remove), |
873 | }; | 873 | }; |
874 | 874 | ||
875 | /* Module functions */ | 875 | module_platform_driver(timblogiw_platform_driver); |
876 | |||
877 | static int __init timblogiw_init(void) | ||
878 | { | ||
879 | return platform_driver_register(&timblogiw_platform_driver); | ||
880 | } | ||
881 | |||
882 | static void __exit timblogiw_exit(void) | ||
883 | { | ||
884 | platform_driver_unregister(&timblogiw_platform_driver); | ||
885 | } | ||
886 | |||
887 | module_init(timblogiw_init); | ||
888 | module_exit(timblogiw_exit); | ||
889 | 876 | ||
890 | MODULE_DESCRIPTION(TIMBLOGIWIN_NAME); | 877 | MODULE_DESCRIPTION(TIMBLOGIWIN_NAME); |
891 | MODULE_AUTHOR("Pelagicore AB <info@pelagicore.com>"); | 878 | MODULE_AUTHOR("Pelagicore AB <info@pelagicore.com>"); |
diff --git a/drivers/media/video/via-camera.c b/drivers/media/video/via-camera.c index 6a828759e387..7e2c34ed0564 100644 --- a/drivers/media/video/via-camera.c +++ b/drivers/media/video/via-camera.c | |||
@@ -1500,14 +1500,4 @@ static struct platform_driver viacam_driver = { | |||
1500 | .remove = viacam_remove, | 1500 | .remove = viacam_remove, |
1501 | }; | 1501 | }; |
1502 | 1502 | ||
1503 | static int viacam_init(void) | 1503 | module_platform_driver(viacam_driver); |
1504 | { | ||
1505 | return platform_driver_register(&viacam_driver); | ||
1506 | } | ||
1507 | module_init(viacam_init); | ||
1508 | |||
1509 | static void viacam_exit(void) | ||
1510 | { | ||
1511 | platform_driver_unregister(&viacam_driver); | ||
1512 | } | ||
1513 | module_exit(viacam_exit); | ||