aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-10 01:21:49 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-10 20:27:13 -0500
commit1d6629b1561ad34a6e6d17ece00bd65e1bab3724 (patch)
tree61b5a5062aa797f5bfc1da0a7b3b9876ce3d2a21 /drivers
parentaa5fb974cf3a30162c9c426c507486f3c2ab54c5 (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')
-rw-r--r--drivers/media/radio/radio-si4713.c15
-rw-r--r--drivers/media/radio/radio-timb.c15
-rw-r--r--drivers/media/radio/radio-wl1273.c17
-rw-r--r--drivers/media/video/davinci/dm355_ccdc.c13
-rw-r--r--drivers/media/video/davinci/dm644x_ccdc.c13
-rw-r--r--drivers/media/video/davinci/isif.c13
-rw-r--r--drivers/media/video/davinci/vpbe.c24
-rw-r--r--drivers/media/video/davinci/vpbe_display.c38
-rw-r--r--drivers/media/video/davinci/vpbe_osd.c18
-rw-r--r--drivers/media/video/davinci/vpbe_venc.c18
-rw-r--r--drivers/media/video/davinci/vpfe_capture.c18
-rw-r--r--drivers/media/video/fsl-viu.c13
-rw-r--r--drivers/media/video/mx3_camera.c14
-rw-r--r--drivers/media/video/omap1_camera.c12
-rw-r--r--drivers/media/video/omap24xxcam.c19
-rw-r--r--drivers/media/video/omap3isp/isp.c19
-rw-r--r--drivers/media/video/pxa_camera.c14
-rw-r--r--drivers/media/video/s5p-g2d/g2d.c16
-rw-r--r--drivers/media/video/s5p-mfc/s5p_mfc.c22
-rw-r--r--drivers/media/video/s5p-tv/hdmi_drv.c26
-rw-r--r--drivers/media/video/s5p-tv/sdo_drv.c22
-rw-r--r--drivers/media/video/sh_mobile_csi2.c13
-rw-r--r--drivers/media/video/soc_camera_platform.c13
-rw-r--r--drivers/media/video/timblogiw.c15
-rw-r--r--drivers/media/video/via-camera.c12
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 */ 358module_platform_driver(radio_si4713_pdriver);
359static int __init radio_si4713_module_init(void)
360{
361 return platform_driver_register(&radio_si4713_pdriver);
362}
363
364static void __exit radio_si4713_module_exit(void)
365{
366 platform_driver_unregister(&radio_si4713_pdriver);
367}
368
369module_init(radio_si4713_module_init);
370module_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/*--------------------------------------------------------------------------*/ 229module_platform_driver(timbradio_platform_driver);
230
231static int __init timbradio_init(void)
232{
233 return platform_driver_register(&timbradio_platform_driver);
234}
235
236static void __exit timbradio_exit(void)
237{
238 platform_driver_unregister(&timbradio_platform_driver);
239}
240
241module_init(timbradio_init);
242module_exit(timbradio_exit);
243 230
244MODULE_DESCRIPTION("Timberdale Radio driver"); 231MODULE_DESCRIPTION("Timberdale Radio driver");
245MODULE_AUTHOR("Mocean Laboratories <info@mocean-labs.com>"); 232MODULE_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
2151MODULE_ALIAS("platform:wl1273_fm_radio");
2152
2153static struct platform_driver wl1273_fm_radio_driver = { 2151static 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
2162static int __init wl1273_fm_module_init(void) 2160module_platform_driver(wl1273_fm_radio_driver);
2163{
2164 pr_info("%s\n", __func__);
2165 return platform_driver_register(&wl1273_fm_radio_driver);
2166}
2167module_init(wl1273_fm_module_init);
2168
2169static void __exit wl1273_fm_module_exit(void)
2170{
2171 platform_driver_unregister(&wl1273_fm_radio_driver);
2172 pr_info(DRIVER_DESC ", Exiting.\n");
2173}
2174module_exit(wl1273_fm_module_exit);
2175 2161
2176MODULE_AUTHOR("Matti Aaltonen <matti.j.aaltonen@nokia.com>"); 2162MODULE_AUTHOR("Matti Aaltonen <matti.j.aaltonen@nokia.com>");
2177MODULE_DESCRIPTION(DRIVER_DESC); 2163MODULE_DESCRIPTION(DRIVER_DESC);
2178MODULE_LICENSE("GPL"); 2164MODULE_LICENSE("GPL");
2165MODULE_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
1072static int __init dm355_ccdc_init(void) 1072module_platform_driver(dm355_ccdc_driver);
1073{
1074 return platform_driver_register(&dm355_ccdc_driver);
1075}
1076
1077static void __exit dm355_ccdc_exit(void)
1078{
1079 platform_driver_unregister(&dm355_ccdc_driver);
1080}
1081
1082module_init(dm355_ccdc_init);
1083module_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
1081static int __init dm644x_ccdc_init(void) 1081module_platform_driver(dm644x_ccdc_driver);
1082{
1083 return platform_driver_register(&dm644x_ccdc_driver);
1084}
1085
1086static void __exit dm644x_ccdc_exit(void)
1087{
1088 platform_driver_unregister(&dm644x_ccdc_driver);
1089}
1090
1091module_init(dm644x_ccdc_init);
1092module_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
1159static int __init isif_init(void) 1159module_platform_driver(isif_driver);
1160{
1161 return platform_driver_register(&isif_driver);
1162}
1163
1164static void isif_exit(void)
1165{
1166 platform_driver_unregister(&isif_driver);
1167}
1168
1169module_init(isif_init);
1170module_exit(isif_exit);
1171 1160
1172MODULE_LICENSE("GPL"); 1161MODULE_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/** 886module_platform_driver(vpbe_driver);
887 * vpbe_init: initialize the vpbe driver
888 *
889 * This function registers device and driver to the kernel
890 */
891static __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 */
901static void vpbe_cleanup(void)
902{
903 platform_driver_unregister(&vpbe_driver);
904}
905
906/* Function for module initialization and cleanup */
907module_init(vpbe_init);
908module_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/* 1820module_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 */
1825static __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 */
1846static 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 */
1855module_init(vpbe_display_init);
1856module_exit(vpbe_display_cleanup);
1857 1821
1858MODULE_DESCRIPTION("TI DM644x/DM355/DM365 VPBE Display controller"); 1822MODULE_DESCRIPTION("TI DM644x/DM355/DM365 VPBE Display controller");
1859MODULE_LICENSE("GPL"); 1823MODULE_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
1602static int osd_init(void) 1602module_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
1612static void osd_exit(void)
1613{
1614 platform_driver_unregister(&osd_driver);
1615}
1616
1617module_init(osd_init);
1618module_exit(osd_exit);
1619 1603
1620MODULE_LICENSE("GPL"); 1604MODULE_LICENSE("GPL");
1621MODULE_DESCRIPTION("DaVinci OSD Manager Driver"); 1605MODULE_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
703static int venc_init(void) 703module_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
712static void venc_exit(void)
713{
714 platform_driver_unregister(&venc_driver);
715 return;
716}
717
718module_init(venc_init);
719module_exit(venc_exit);
720 704
721MODULE_LICENSE("GPL"); 705MODULE_LICENSE("GPL");
722MODULE_DESCRIPTION("VPBE VENC Driver"); 706MODULE_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
2079static __init int vpfe_init(void) 2079module_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 */
2089static void vpfe_cleanup(void)
2090{
2091 platform_driver_unregister(&vpfe_driver);
2092}
2093
2094module_init(vpfe_init);
2095module_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
1664static int __init viu_init(void) 1664module_platform_driver(viu_of_platform_driver);
1665{
1666 return platform_driver_register(&viu_of_platform_driver);
1667}
1668
1669static void __exit viu_exit(void)
1670{
1671 platform_driver_unregister(&viu_of_platform_driver);
1672}
1673
1674module_init(viu_init);
1675module_exit(viu_exit);
1676 1665
1677MODULE_DESCRIPTION("Freescale Video-In(VIU)"); 1666MODULE_DESCRIPTION("Freescale Video-In(VIU)");
1678MODULE_AUTHOR("Hongjun Chen"); 1667MODULE_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 1289module_platform_driver(mx3_camera_driver);
1290static int __init mx3_camera_init(void)
1291{
1292 return platform_driver_register(&mx3_camera_driver);
1293}
1294
1295static void __exit mx3_camera_exit(void)
1296{
1297 platform_driver_unregister(&mx3_camera_driver);
1298}
1299
1300module_init(mx3_camera_init);
1301module_exit(mx3_camera_exit);
1302 1290
1303MODULE_DESCRIPTION("i.MX3x SoC Camera Host driver"); 1291MODULE_DESCRIPTION("i.MX3x SoC Camera Host driver");
1304MODULE_AUTHOR("Guennadi Liakhovetski <lg@denx.de>"); 1292MODULE_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
1716static int __init omap1_cam_init(void) 1716module_platform_driver(omap1_cam_driver);
1717{
1718 return platform_driver_register(&omap1_cam_driver);
1719}
1720module_init(omap1_cam_init);
1721
1722static void __exit omap1_cam_exit(void)
1723{
1724 platform_driver_unregister(&omap1_cam_driver);
1725}
1726module_exit(omap1_cam_exit);
1727 1717
1728module_param(sg_mode, bool, 0644); 1718module_param(sg_mode, bool, 0644);
1729MODULE_PARM_DESC(sg_mode, "videobuf mode, 0: dma-contig (default), 1: dma-sg"); 1719MODULE_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/* 1871module_platform_driver(omap24xxcam_driver);
1872 *
1873 * Module initialisation and deinitialisation
1874 *
1875 */
1876
1877static int __init omap24xxcam_init(void)
1878{
1879 return platform_driver_register(&omap24xxcam_driver);
1880}
1881
1882static void __exit omap24xxcam_cleanup(void)
1883{
1884 platform_driver_unregister(&omap24xxcam_driver);
1885}
1886 1872
1887MODULE_AUTHOR("Sakari Ailus <sakari.ailus@nokia.com>"); 1873MODULE_AUTHOR("Sakari Ailus <sakari.ailus@nokia.com>");
1888MODULE_DESCRIPTION("OMAP24xx Video for Linux camera driver"); 1874MODULE_DESCRIPTION("OMAP24xx Video for Linux camera driver");
@@ -1894,6 +1880,3 @@ MODULE_PARM_DESC(video_nr,
1894module_param(capture_mem, int, 0); 1880module_param(capture_mem, int, 0);
1895MODULE_PARM_DESC(capture_mem, "Maximum amount of memory for capture " 1881MODULE_PARM_DESC(capture_mem, "Maximum amount of memory for capture "
1896 "buffers (default 4800kiB)"); 1882 "buffers (default 4800kiB)");
1897
1898module_init(omap24xxcam_init);
1899module_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/* 2250module_platform_driver(omap3isp_driver);
2251 * isp_init - ISP module initialization.
2252 */
2253static int __init isp_init(void)
2254{
2255 return platform_driver_register(&omap3isp_driver);
2256}
2257
2258/*
2259 * isp_cleanup - ISP module cleanup.
2260 */
2261static void __exit isp_cleanup(void)
2262{
2263 platform_driver_unregister(&omap3isp_driver);
2264}
2265
2266module_init(isp_init);
2267module_exit(isp_cleanup);
2268 2251
2269MODULE_AUTHOR("Nokia Corporation"); 2252MODULE_AUTHOR("Nokia Corporation");
2270MODULE_DESCRIPTION("TI OMAP3 ISP driver"); 2253MODULE_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 1855module_platform_driver(pxa_camera_driver);
1856static int __init pxa_camera_init(void)
1857{
1858 return platform_driver_register(&pxa_camera_driver);
1859}
1860
1861static void __exit pxa_camera_exit(void)
1862{
1863 platform_driver_unregister(&pxa_camera_driver);
1864}
1865
1866module_init(pxa_camera_init);
1867module_exit(pxa_camera_exit);
1868 1856
1869MODULE_DESCRIPTION("PXA27x SoC Camera Host driver"); 1857MODULE_DESCRIPTION("PXA27x SoC Camera Host driver");
1870MODULE_AUTHOR("Guennadi Liakhovetski <kernel@pengutronix.de>"); 1858MODULE_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
806static void __exit g2d_exit(void) 806module_platform_driver(g2d_pdrv);
807{
808 platform_driver_unregister(&g2d_pdrv);
809};
810
811static int __init g2d_init(void)
812{
813 int ret = 0;
814
815 ret = platform_driver_register(&g2d_pdrv);
816 return ret;
817};
818
819module_init(g2d_init);
820module_exit(g2d_exit);
821 807
822MODULE_AUTHOR("Kamil Debski <k.debski@samsung.com>"); 808MODULE_AUTHOR("Kamil Debski <k.debski@samsung.com>");
823MODULE_DESCRIPTION("S5P G2D 2d graphics accelerator driver"); 809MODULE_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
1248static char banner[] __initdata = 1248module_platform_driver(s5p_mfc_driver);
1249 "S5P MFC V4L2 Driver, (C) 2011 Samsung Electronics\n";
1250
1251static 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
1262static void __exit s5p_mfc_exit(void)
1263{
1264 platform_driver_unregister(&s5p_mfc_driver);
1265}
1266
1267module_init(s5p_mfc_init);
1268module_exit(s5p_mfc_exit);
1269 1249
1270MODULE_LICENSE("GPL"); 1250MODULE_LICENSE("GPL");
1271MODULE_AUTHOR("Kamil Debski <k.debski@samsung.com>"); 1251MODULE_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 */ 1019module_platform_driver(hdmi_driver);
1020
1021static 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}
1035module_init(hdmi_init);
1036
1037static void __exit hdmi_exit(void)
1038{
1039 platform_driver_unregister(&hdmi_driver);
1040}
1041module_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
460static int __init sdo_init(void) 460module_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}
474module_init(sdo_init);
475
476static void __exit sdo_exit(void)
477{
478 platform_driver_unregister(&sdo_driver);
479}
480module_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
393static int __init sh_csi2_init(void) 393module_platform_driver(sh_csi2_pdrv);
394{
395 return platform_driver_register(&sh_csi2_pdrv);
396}
397
398static void __exit sh_csi2_exit(void)
399{
400 platform_driver_unregister(&sh_csi2_pdrv);
401}
402
403module_init(sh_csi2_init);
404module_exit(sh_csi2_exit);
405 394
406MODULE_DESCRIPTION("SH-Mobile MIPI CSI-2 driver"); 395MODULE_DESCRIPTION("SH-Mobile MIPI CSI-2 driver");
407MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>"); 396MODULE_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
192static int __init soc_camera_platform_module_init(void) 192module_platform_driver(soc_camera_platform_driver);
193{
194 return platform_driver_register(&soc_camera_platform_driver);
195}
196
197static void __exit soc_camera_platform_module_exit(void)
198{
199 platform_driver_unregister(&soc_camera_platform_driver);
200}
201
202module_init(soc_camera_platform_module_init);
203module_exit(soc_camera_platform_module_exit);
204 193
205MODULE_DESCRIPTION("SoC Camera Platform driver"); 194MODULE_DESCRIPTION("SoC Camera Platform driver");
206MODULE_AUTHOR("Magnus Damm"); 195MODULE_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 */ 875module_platform_driver(timblogiw_platform_driver);
876
877static int __init timblogiw_init(void)
878{
879 return platform_driver_register(&timblogiw_platform_driver);
880}
881
882static void __exit timblogiw_exit(void)
883{
884 platform_driver_unregister(&timblogiw_platform_driver);
885}
886
887module_init(timblogiw_init);
888module_exit(timblogiw_exit);
889 876
890MODULE_DESCRIPTION(TIMBLOGIWIN_NAME); 877MODULE_DESCRIPTION(TIMBLOGIWIN_NAME);
891MODULE_AUTHOR("Pelagicore AB <info@pelagicore.com>"); 878MODULE_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
1503static int viacam_init(void) 1503module_platform_driver(viacam_driver);
1504{
1505 return platform_driver_register(&viacam_driver);
1506}
1507module_init(viacam_init);
1508
1509static void viacam_exit(void)
1510{
1511 platform_driver_unregister(&viacam_driver);
1512}
1513module_exit(viacam_exit);