video: convert drivers/video/* to use module_platform_driver()
authorAxel Lin <axel.lin@gmail.com>
Sat, 26 Nov 2011 02:25:54 +0000 (10:25 +0800)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Sat, 3 Dec 2011 22:08:42 +0000 (22:08 +0000)
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>
14 files changed:
drivers/video/mxsfb.c
drivers/video/nuc900fb.c
drivers/video/pxa168fb.c
drivers/video/pxa3xx-gcu.c
drivers/video/s3c-fb.c
drivers/video/sh7760fb.c
drivers/video/sh_mobile_lcdcfb.c
drivers/video/sh_mobile_meram.c
drivers/video/sm501fb.c
drivers/video/vt8500lcdfb.c
drivers/video/w100fb.c
drivers/video/wm8505fb.c
drivers/video/wmt_ge_rops.c
drivers/video/xilinxfb.c

index d837d63c456feac5f5886ec6c31bb733c405bba3..18742c26463b2676a35c510e8da271a32ed256f2 100644 (file)
@@ -902,18 +902,7 @@ static struct platform_driver mxsfb_driver = {
        },
 };
 
-static int __init mxsfb_init(void)
-{
-       return platform_driver_register(&mxsfb_driver);
-}
-
-static void __exit mxsfb_exit(void)
-{
-       platform_driver_unregister(&mxsfb_driver);
-}
-
-module_init(mxsfb_init);
-module_exit(mxsfb_exit);
+module_platform_driver(mxsfb_devtype);
 
 MODULE_DESCRIPTION("Freescale mxs framebuffer driver");
 MODULE_AUTHOR("Sascha Hauer, Pengutronix");
index d1fbbd888cf436b6ed8ce9d05e442ff3f605514b..e10f551ade2121eba471f4ddca476cc4e0b49d20 100644 (file)
@@ -762,18 +762,7 @@ static struct platform_driver nuc900fb_driver = {
        },
 };
 
-int __devinit nuc900fb_init(void)
-{
-       return platform_driver_register(&nuc900fb_driver);
-}
-
-static void __exit nuc900fb_cleanup(void)
-{
-       platform_driver_unregister(&nuc900fb_driver);
-}
-
-module_init(nuc900fb_init);
-module_exit(nuc900fb_cleanup);
+module_platform_driver(nuc900fb_driver);
 
 MODULE_DESCRIPTION("Framebuffer driver for the NUC900");
 MODULE_LICENSE("GPL");
index 18ead6f0184d136dcfc884e21db207748e18a0ef..8384b941f6ba1dd922bdeffec17fede7f180fdca 100644 (file)
@@ -832,17 +832,7 @@ static struct platform_driver pxa168fb_driver = {
        .remove         = __devexit_p(pxa168fb_remove),
 };
 
-static int __init pxa168fb_init(void)
-{
-       return platform_driver_register(&pxa168fb_driver);
-}
-module_init(pxa168fb_init);
-
-static void __exit pxa168fb_exit(void)
-{
-       platform_driver_unregister(&pxa168fb_driver);
-}
-module_exit(pxa168fb_exit);
+module_platform_driver(pxa168fb_driver);
 
 MODULE_AUTHOR("Lennert Buytenhek <buytenh@marvell.com> "
              "Green Wan <gwan@marvell.com>");
index 1ed8b366618df6234b83183f46d3ac18e6641b98..1d71c08a818f7d1fc646496f9ae9c32d77943c88 100644 (file)
@@ -747,20 +747,7 @@ static struct platform_driver pxa3xx_gcu_driver = {
        },
 };
 
-static int __init
-pxa3xx_gcu_init(void)
-{
-       return platform_driver_register(&pxa3xx_gcu_driver);
-}
-
-static void __exit
-pxa3xx_gcu_exit(void)
-{
-       platform_driver_unregister(&pxa3xx_gcu_driver);
-}
-
-module_init(pxa3xx_gcu_init);
-module_exit(pxa3xx_gcu_exit);
+module_platform_driver(pxa3xx_gcu_driver);
 
 MODULE_DESCRIPTION("PXA3xx graphics controller unit driver");
 MODULE_LICENSE("GPL");
index 12eaee0b29e6b153b0405a49c546c73a3133b80a..cf1d11f5bfb86b1dc7171a5462029275272dc28b 100644 (file)
@@ -2003,18 +2003,7 @@ static struct platform_driver s3c_fb_driver = {
        },
 };
 
-static int __init s3c_fb_init(void)
-{
-       return platform_driver_register(&s3c_fb_driver);
-}
-
-static void __exit s3c_fb_cleanup(void)
-{
-       platform_driver_unregister(&s3c_fb_driver);
-}
-
-module_init(s3c_fb_init);
-module_exit(s3c_fb_cleanup);
+module_platform_driver(s3c_fb_driver);
 
 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
 MODULE_DESCRIPTION("Samsung S3C SoC Framebuffer driver");
index 45e47d8471634d2bd9f57c2ef5e3da88cdc8494b..83b16e237a0e2f4fcf4d2438ea2f3439851129c8 100644 (file)
@@ -585,18 +585,7 @@ static struct platform_driver sh7760_lcdc_driver = {
        .remove = __devexit_p(sh7760fb_remove),
 };
 
-static int __init sh7760fb_init(void)
-{
-       return platform_driver_register(&sh7760_lcdc_driver);
-}
-
-static void __exit sh7760fb_exit(void)
-{
-       platform_driver_unregister(&sh7760_lcdc_driver);
-}
-
-module_init(sh7760fb_init);
-module_exit(sh7760fb_exit);
+module_platform_driver(sh7760_lcdc_driver);
 
 MODULE_AUTHOR("Nobuhiro Iwamatsu, Manuel Lauss");
 MODULE_DESCRIPTION("FBdev for SH7760/63 integrated LCD Controller");
index 1f49ab48d0b5666b30c6dd8efbfaec73ace0a59d..a264ebf971a090a963e6c475ddad8975b7b370bb 100644 (file)
@@ -1709,18 +1709,7 @@ static struct platform_driver sh_mobile_lcdc_driver = {
        .remove         = sh_mobile_lcdc_remove,
 };
 
-static int __init sh_mobile_lcdc_init(void)
-{
-       return platform_driver_register(&sh_mobile_lcdc_driver);
-}
-
-static void __exit sh_mobile_lcdc_exit(void)
-{
-       platform_driver_unregister(&sh_mobile_lcdc_driver);
-}
-
-module_init(sh_mobile_lcdc_init);
-module_exit(sh_mobile_lcdc_exit);
+module_platform_driver(sh_mobile_lcdc_driver);
 
 MODULE_DESCRIPTION("SuperH Mobile LCDC Framebuffer driver");
 MODULE_AUTHOR("Magnus Damm <damm@opensource.se>");
index 4d63490209cdf1431430aa343a513d29e11ba846..f45d83ecfd21ee6a6ee106128f3e8818458d100c 100644 (file)
@@ -679,18 +679,7 @@ static struct platform_driver sh_mobile_meram_driver = {
        .remove         = sh_mobile_meram_remove,
 };
 
-static int __init sh_mobile_meram_init(void)
-{
-       return platform_driver_register(&sh_mobile_meram_driver);
-}
-
-static void __exit sh_mobile_meram_exit(void)
-{
-       platform_driver_unregister(&sh_mobile_meram_driver);
-}
-
-module_init(sh_mobile_meram_init);
-module_exit(sh_mobile_meram_exit);
+module_platform_driver(sh_mobile_meram_driver);
 
 MODULE_DESCRIPTION("SuperH Mobile MERAM driver");
 MODULE_AUTHOR("Damian Hobson-Garcia / Takanari Hayama");
index a78254cf8e83eb971db5bd7f6cb499745a6741f6..3690effbedccc2bf552c66e997ca5257b1b4c20a 100644 (file)
@@ -2230,18 +2230,7 @@ static struct platform_driver sm501fb_driver = {
        },
 };
 
-static int __devinit sm501fb_init(void)
-{
-       return platform_driver_register(&sm501fb_driver);
-}
-
-static void __exit sm501fb_cleanup(void)
-{
-       platform_driver_unregister(&sm501fb_driver);
-}
-
-module_init(sm501fb_init);
-module_exit(sm501fb_cleanup);
+module_platform_driver(sm501fb_driver);
 
 module_param_named(mode, fb_mode, charp, 0);
 MODULE_PARM_DESC(mode,
index 777c21dd7a6ba8b126d4a63feec5765b48a24db7..2a5fe6ede845a96dcfdf40c6e48c5295c11ba756 100644 (file)
@@ -457,18 +457,7 @@ static struct platform_driver vt8500lcd_driver = {
        },
 };
 
-static int __init vt8500lcd_init(void)
-{
-       return platform_driver_register(&vt8500lcd_driver);
-}
-
-static void __exit vt8500lcd_exit(void)
-{
-       platform_driver_unregister(&vt8500lcd_driver);
-}
-
-module_init(vt8500lcd_init);
-module_exit(vt8500lcd_exit);
+module_platform_driver(vt8500lcd_driver);
 
 MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com>");
 MODULE_DESCRIPTION("LCD controller driver for VIA VT8500");
index 2375e5bbf572e8c55d0e65d1a94ddca813634ce9..90a2e30272ad7ae90e4b106426dd37c486c73cd6 100644 (file)
@@ -1620,18 +1620,7 @@ static struct platform_driver w100fb_driver = {
        },
 };
 
-int __init w100fb_init(void)
-{
-       return platform_driver_register(&w100fb_driver);
-}
-
-void __exit w100fb_cleanup(void)
-{
-       platform_driver_unregister(&w100fb_driver);
-}
-
-module_init(w100fb_init);
-module_exit(w100fb_cleanup);
+module_platform_driver(w100fb_driver);
 
 MODULE_DESCRIPTION("ATI Imageon w100 framebuffer driver");
 MODULE_LICENSE("GPL");
index 96e34a569169db21d47f2b1ac3e687cb68bcb071..c8703bd61b74f6c2a9a77c8e7ebdb1aadcfa63d0 100644 (file)
@@ -404,18 +404,7 @@ static struct platform_driver wm8505fb_driver = {
        },
 };
 
-static int __init wm8505fb_init(void)
-{
-       return platform_driver_register(&wm8505fb_driver);
-}
-
-static void __exit wm8505fb_exit(void)
-{
-       platform_driver_unregister(&wm8505fb_driver);
-}
-
-module_init(wm8505fb_init);
-module_exit(wm8505fb_exit);
+module_platform_driver(wm8505fb_driver);
 
 MODULE_AUTHOR("Ed Spiridonov <edo.rus@gmail.com>");
 MODULE_DESCRIPTION("Framebuffer driver for WMT WM8505");
index 45832b7ef7d2c39107d719a1c58a378709c5dc57..55be3865015bd103aabd9a1bdb1d7837c6c0530d 100644 (file)
@@ -167,18 +167,7 @@ static struct platform_driver wmt_ge_rops_driver = {
        },
 };
 
-static int __init wmt_ge_rops_init(void)
-{
-       return platform_driver_register(&wmt_ge_rops_driver);
-}
-
-static void __exit wmt_ge_rops_exit(void)
-{
-       platform_driver_unregister(&wmt_ge_rops_driver);
-}
-
-module_init(wmt_ge_rops_init);
-module_exit(wmt_ge_rops_exit);
+module_platform_driver(wmt_ge_rops_driver);
 
 MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com");
 MODULE_DESCRIPTION("Accelerators for raster operations using "
index fcb6cd90f64d8ade134626076a622ac4a2a16118..18084525402ace0afd1c08ada58e2c2a50f5cfad 100644 (file)
@@ -511,25 +511,7 @@ static struct platform_driver xilinxfb_of_driver = {
        },
 };
 
-
-/* ---------------------------------------------------------------------
- * Module setup and teardown
- */
-
-static int __init
-xilinxfb_init(void)
-{
-       return platform_driver_register(&xilinxfb_of_driver);
-}
-
-static void __exit
-xilinxfb_cleanup(void)
-{
-       platform_driver_unregister(&xilinxfb_of_driver);
-}
-
-module_init(xilinxfb_init);
-module_exit(xilinxfb_cleanup);
+module_platform_driver(xilinxfb_of_driver);
 
 MODULE_AUTHOR("MontaVista Software, Inc. <source@mvista.com>");
 MODULE_DESCRIPTION("Xilinx TFT frame buffer driver");