aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-25 21:25:54 -0500
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-12-03 17:08:42 -0500
commit4277f2c4667187cbbdd3da3be31ee681bc6b8300 (patch)
tree8daecab60ec67cfdecf71ec7668c8e96b28b17b8 /drivers/video
parent9056df19c2a63cec88cf580ab131214ef90d5cb1 (diff)
video: convert drivers/video/* to use module_platform_driver()
This patch converts the drivers in drivers/video/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Ben Dooks <ben@simtec.co.uk> Cc: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wan ZongShun <mcuos.com@gmail.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Lennert Buytenhek <buytenh@wantstofly.org> Acked-by: Alexey Charkov <alchark@gmail.com> Acked-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/mxsfb.c13
-rw-r--r--drivers/video/nuc900fb.c13
-rw-r--r--drivers/video/pxa168fb.c12
-rw-r--r--drivers/video/pxa3xx-gcu.c15
-rw-r--r--drivers/video/s3c-fb.c13
-rw-r--r--drivers/video/sh7760fb.c13
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c13
-rw-r--r--drivers/video/sh_mobile_meram.c13
-rw-r--r--drivers/video/sm501fb.c13
-rw-r--r--drivers/video/vt8500lcdfb.c13
-rw-r--r--drivers/video/w100fb.c13
-rw-r--r--drivers/video/wm8505fb.c13
-rw-r--r--drivers/video/wmt_ge_rops.c13
-rw-r--r--drivers/video/xilinxfb.c20
14 files changed, 14 insertions, 176 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index d837d63c456f..18742c26463b 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -902,18 +902,7 @@ static struct platform_driver mxsfb_driver = {
902 }, 902 },
903}; 903};
904 904
905static int __init mxsfb_init(void) 905module_platform_driver(mxsfb_devtype);
906{
907 return platform_driver_register(&mxsfb_driver);
908}
909
910static void __exit mxsfb_exit(void)
911{
912 platform_driver_unregister(&mxsfb_driver);
913}
914
915module_init(mxsfb_init);
916module_exit(mxsfb_exit);
917 906
918MODULE_DESCRIPTION("Freescale mxs framebuffer driver"); 907MODULE_DESCRIPTION("Freescale mxs framebuffer driver");
919MODULE_AUTHOR("Sascha Hauer, Pengutronix"); 908MODULE_AUTHOR("Sascha Hauer, Pengutronix");
diff --git a/drivers/video/nuc900fb.c b/drivers/video/nuc900fb.c
index d1fbbd888cf4..e10f551ade21 100644
--- a/drivers/video/nuc900fb.c
+++ b/drivers/video/nuc900fb.c
@@ -762,18 +762,7 @@ static struct platform_driver nuc900fb_driver = {
762 }, 762 },
763}; 763};
764 764
765int __devinit nuc900fb_init(void) 765module_platform_driver(nuc900fb_driver);
766{
767 return platform_driver_register(&nuc900fb_driver);
768}
769
770static void __exit nuc900fb_cleanup(void)
771{
772 platform_driver_unregister(&nuc900fb_driver);
773}
774
775module_init(nuc900fb_init);
776module_exit(nuc900fb_cleanup);
777 766
778MODULE_DESCRIPTION("Framebuffer driver for the NUC900"); 767MODULE_DESCRIPTION("Framebuffer driver for the NUC900");
779MODULE_LICENSE("GPL"); 768MODULE_LICENSE("GPL");
diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c
index 18ead6f0184d..8384b941f6ba 100644
--- a/drivers/video/pxa168fb.c
+++ b/drivers/video/pxa168fb.c
@@ -832,17 +832,7 @@ static struct platform_driver pxa168fb_driver = {
832 .remove = __devexit_p(pxa168fb_remove), 832 .remove = __devexit_p(pxa168fb_remove),
833}; 833};
834 834
835static int __init pxa168fb_init(void) 835module_platform_driver(pxa168fb_driver);
836{
837 return platform_driver_register(&pxa168fb_driver);
838}
839module_init(pxa168fb_init);
840
841static void __exit pxa168fb_exit(void)
842{
843 platform_driver_unregister(&pxa168fb_driver);
844}
845module_exit(pxa168fb_exit);
846 836
847MODULE_AUTHOR("Lennert Buytenhek <buytenh@marvell.com> " 837MODULE_AUTHOR("Lennert Buytenhek <buytenh@marvell.com> "
848 "Green Wan <gwan@marvell.com>"); 838 "Green Wan <gwan@marvell.com>");
diff --git a/drivers/video/pxa3xx-gcu.c b/drivers/video/pxa3xx-gcu.c
index 1ed8b366618d..1d71c08a818f 100644
--- a/drivers/video/pxa3xx-gcu.c
+++ b/drivers/video/pxa3xx-gcu.c
@@ -747,20 +747,7 @@ static struct platform_driver pxa3xx_gcu_driver = {
747 }, 747 },
748}; 748};
749 749
750static int __init 750module_platform_driver(pxa3xx_gcu_driver);
751pxa3xx_gcu_init(void)
752{
753 return platform_driver_register(&pxa3xx_gcu_driver);
754}
755
756static void __exit
757pxa3xx_gcu_exit(void)
758{
759 platform_driver_unregister(&pxa3xx_gcu_driver);
760}
761
762module_init(pxa3xx_gcu_init);
763module_exit(pxa3xx_gcu_exit);
764 751
765MODULE_DESCRIPTION("PXA3xx graphics controller unit driver"); 752MODULE_DESCRIPTION("PXA3xx graphics controller unit driver");
766MODULE_LICENSE("GPL"); 753MODULE_LICENSE("GPL");
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 12eaee0b29e6..cf1d11f5bfb8 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -2003,18 +2003,7 @@ static struct platform_driver s3c_fb_driver = {
2003 }, 2003 },
2004}; 2004};
2005 2005
2006static int __init s3c_fb_init(void) 2006module_platform_driver(s3c_fb_driver);
2007{
2008 return platform_driver_register(&s3c_fb_driver);
2009}
2010
2011static void __exit s3c_fb_cleanup(void)
2012{
2013 platform_driver_unregister(&s3c_fb_driver);
2014}
2015
2016module_init(s3c_fb_init);
2017module_exit(s3c_fb_cleanup);
2018 2007
2019MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); 2008MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
2020MODULE_DESCRIPTION("Samsung S3C SoC Framebuffer driver"); 2009MODULE_DESCRIPTION("Samsung S3C SoC Framebuffer driver");
diff --git a/drivers/video/sh7760fb.c b/drivers/video/sh7760fb.c
index 45e47d847163..83b16e237a0e 100644
--- a/drivers/video/sh7760fb.c
+++ b/drivers/video/sh7760fb.c
@@ -585,18 +585,7 @@ static struct platform_driver sh7760_lcdc_driver = {
585 .remove = __devexit_p(sh7760fb_remove), 585 .remove = __devexit_p(sh7760fb_remove),
586}; 586};
587 587
588static int __init sh7760fb_init(void) 588module_platform_driver(sh7760_lcdc_driver);
589{
590 return platform_driver_register(&sh7760_lcdc_driver);
591}
592
593static void __exit sh7760fb_exit(void)
594{
595 platform_driver_unregister(&sh7760_lcdc_driver);
596}
597
598module_init(sh7760fb_init);
599module_exit(sh7760fb_exit);
600 589
601MODULE_AUTHOR("Nobuhiro Iwamatsu, Manuel Lauss"); 590MODULE_AUTHOR("Nobuhiro Iwamatsu, Manuel Lauss");
602MODULE_DESCRIPTION("FBdev for SH7760/63 integrated LCD Controller"); 591MODULE_DESCRIPTION("FBdev for SH7760/63 integrated LCD Controller");
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 1f49ab48d0b5..a264ebf971a0 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1709,18 +1709,7 @@ static struct platform_driver sh_mobile_lcdc_driver = {
1709 .remove = sh_mobile_lcdc_remove, 1709 .remove = sh_mobile_lcdc_remove,
1710}; 1710};
1711 1711
1712static int __init sh_mobile_lcdc_init(void) 1712module_platform_driver(sh_mobile_lcdc_driver);
1713{
1714 return platform_driver_register(&sh_mobile_lcdc_driver);
1715}
1716
1717static void __exit sh_mobile_lcdc_exit(void)
1718{
1719 platform_driver_unregister(&sh_mobile_lcdc_driver);
1720}
1721
1722module_init(sh_mobile_lcdc_init);
1723module_exit(sh_mobile_lcdc_exit);
1724 1713
1725MODULE_DESCRIPTION("SuperH Mobile LCDC Framebuffer driver"); 1714MODULE_DESCRIPTION("SuperH Mobile LCDC Framebuffer driver");
1726MODULE_AUTHOR("Magnus Damm <damm@opensource.se>"); 1715MODULE_AUTHOR("Magnus Damm <damm@opensource.se>");
diff --git a/drivers/video/sh_mobile_meram.c b/drivers/video/sh_mobile_meram.c
index 4d63490209cd..f45d83ecfd21 100644
--- a/drivers/video/sh_mobile_meram.c
+++ b/drivers/video/sh_mobile_meram.c
@@ -679,18 +679,7 @@ static struct platform_driver sh_mobile_meram_driver = {
679 .remove = sh_mobile_meram_remove, 679 .remove = sh_mobile_meram_remove,
680}; 680};
681 681
682static int __init sh_mobile_meram_init(void) 682module_platform_driver(sh_mobile_meram_driver);
683{
684 return platform_driver_register(&sh_mobile_meram_driver);
685}
686
687static void __exit sh_mobile_meram_exit(void)
688{
689 platform_driver_unregister(&sh_mobile_meram_driver);
690}
691
692module_init(sh_mobile_meram_init);
693module_exit(sh_mobile_meram_exit);
694 683
695MODULE_DESCRIPTION("SuperH Mobile MERAM driver"); 684MODULE_DESCRIPTION("SuperH Mobile MERAM driver");
696MODULE_AUTHOR("Damian Hobson-Garcia / Takanari Hayama"); 685MODULE_AUTHOR("Damian Hobson-Garcia / Takanari Hayama");
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index a78254cf8e83..3690effbedcc 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -2230,18 +2230,7 @@ static struct platform_driver sm501fb_driver = {
2230 }, 2230 },
2231}; 2231};
2232 2232
2233static int __devinit sm501fb_init(void) 2233module_platform_driver(sm501fb_driver);
2234{
2235 return platform_driver_register(&sm501fb_driver);
2236}
2237
2238static void __exit sm501fb_cleanup(void)
2239{
2240 platform_driver_unregister(&sm501fb_driver);
2241}
2242
2243module_init(sm501fb_init);
2244module_exit(sm501fb_cleanup);
2245 2234
2246module_param_named(mode, fb_mode, charp, 0); 2235module_param_named(mode, fb_mode, charp, 0);
2247MODULE_PARM_DESC(mode, 2236MODULE_PARM_DESC(mode,
diff --git a/drivers/video/vt8500lcdfb.c b/drivers/video/vt8500lcdfb.c
index 777c21dd7a6b..2a5fe6ede845 100644
--- a/drivers/video/vt8500lcdfb.c
+++ b/drivers/video/vt8500lcdfb.c
@@ -457,18 +457,7 @@ static struct platform_driver vt8500lcd_driver = {
457 }, 457 },
458}; 458};
459 459
460static int __init vt8500lcd_init(void) 460module_platform_driver(vt8500lcd_driver);
461{
462 return platform_driver_register(&vt8500lcd_driver);
463}
464
465static void __exit vt8500lcd_exit(void)
466{
467 platform_driver_unregister(&vt8500lcd_driver);
468}
469
470module_init(vt8500lcd_init);
471module_exit(vt8500lcd_exit);
472 461
473MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com>"); 462MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com>");
474MODULE_DESCRIPTION("LCD controller driver for VIA VT8500"); 463MODULE_DESCRIPTION("LCD controller driver for VIA VT8500");
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
index 2375e5bbf572..90a2e30272ad 100644
--- a/drivers/video/w100fb.c
+++ b/drivers/video/w100fb.c
@@ -1620,18 +1620,7 @@ static struct platform_driver w100fb_driver = {
1620 }, 1620 },
1621}; 1621};
1622 1622
1623int __init w100fb_init(void) 1623module_platform_driver(w100fb_driver);
1624{
1625 return platform_driver_register(&w100fb_driver);
1626}
1627
1628void __exit w100fb_cleanup(void)
1629{
1630 platform_driver_unregister(&w100fb_driver);
1631}
1632
1633module_init(w100fb_init);
1634module_exit(w100fb_cleanup);
1635 1624
1636MODULE_DESCRIPTION("ATI Imageon w100 framebuffer driver"); 1625MODULE_DESCRIPTION("ATI Imageon w100 framebuffer driver");
1637MODULE_LICENSE("GPL"); 1626MODULE_LICENSE("GPL");
diff --git a/drivers/video/wm8505fb.c b/drivers/video/wm8505fb.c
index 96e34a569169..c8703bd61b74 100644
--- a/drivers/video/wm8505fb.c
+++ b/drivers/video/wm8505fb.c
@@ -404,18 +404,7 @@ static struct platform_driver wm8505fb_driver = {
404 }, 404 },
405}; 405};
406 406
407static int __init wm8505fb_init(void) 407module_platform_driver(wm8505fb_driver);
408{
409 return platform_driver_register(&wm8505fb_driver);
410}
411
412static void __exit wm8505fb_exit(void)
413{
414 platform_driver_unregister(&wm8505fb_driver);
415}
416
417module_init(wm8505fb_init);
418module_exit(wm8505fb_exit);
419 408
420MODULE_AUTHOR("Ed Spiridonov <edo.rus@gmail.com>"); 409MODULE_AUTHOR("Ed Spiridonov <edo.rus@gmail.com>");
421MODULE_DESCRIPTION("Framebuffer driver for WMT WM8505"); 410MODULE_DESCRIPTION("Framebuffer driver for WMT WM8505");
diff --git a/drivers/video/wmt_ge_rops.c b/drivers/video/wmt_ge_rops.c
index 45832b7ef7d2..55be3865015b 100644
--- a/drivers/video/wmt_ge_rops.c
+++ b/drivers/video/wmt_ge_rops.c
@@ -167,18 +167,7 @@ static struct platform_driver wmt_ge_rops_driver = {
167 }, 167 },
168}; 168};
169 169
170static int __init wmt_ge_rops_init(void) 170module_platform_driver(wmt_ge_rops_driver);
171{
172 return platform_driver_register(&wmt_ge_rops_driver);
173}
174
175static void __exit wmt_ge_rops_exit(void)
176{
177 platform_driver_unregister(&wmt_ge_rops_driver);
178}
179
180module_init(wmt_ge_rops_init);
181module_exit(wmt_ge_rops_exit);
182 171
183MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com"); 172MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com");
184MODULE_DESCRIPTION("Accelerators for raster operations using " 173MODULE_DESCRIPTION("Accelerators for raster operations using "
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index fcb6cd90f64d..18084525402a 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -511,25 +511,7 @@ static struct platform_driver xilinxfb_of_driver = {
511 }, 511 },
512}; 512};
513 513
514 514module_platform_driver(xilinxfb_of_driver);
515/* ---------------------------------------------------------------------
516 * Module setup and teardown
517 */
518
519static int __init
520xilinxfb_init(void)
521{
522 return platform_driver_register(&xilinxfb_of_driver);
523}
524
525static void __exit
526xilinxfb_cleanup(void)
527{
528 platform_driver_unregister(&xilinxfb_of_driver);
529}
530
531module_init(xilinxfb_init);
532module_exit(xilinxfb_cleanup);
533 515
534MODULE_AUTHOR("MontaVista Software, Inc. <source@mvista.com>"); 516MODULE_AUTHOR("MontaVista Software, Inc. <source@mvista.com>");
535MODULE_DESCRIPTION("Xilinx TFT frame buffer driver"); 517MODULE_DESCRIPTION("Xilinx TFT frame buffer driver");