aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/davinci
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/media/video/davinci
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/media/video/davinci')
-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
8 files changed, 8 insertions, 147 deletions
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);