]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
drivers: video: use module_platform_driver_probe()
authorFabio Porcedda <fabio.porcedda@gmail.com>
Fri, 15 Mar 2013 13:02:38 +0000 (14:02 +0100)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 10 Apr 2013 12:03:31 +0000 (15:03 +0300)
This patch converts the drivers to use the
module_platform_driver_probe() macro which makes the code smaller and
a bit simpler.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> # atmel_lcdfb.c
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # amifb.c
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/amifb.c
drivers/video/atmel_lcdfb.c
drivers/video/omap2/vrfb.c
drivers/video/sh_mipi_dsi.c
drivers/video/sh_mobile_hdmi.c

index 7fa1bf823729205450d0347a017ef62f9b19cd20..77cb4ffa1fe4f9d04a4b7314e653991b6e88fe57 100644 (file)
@@ -3788,19 +3788,7 @@ static struct platform_driver amifb_driver = {
        },
 };
 
-static int __init amifb_init(void)
-{
-       return platform_driver_probe(&amifb_driver, amifb_probe);
-}
-
-module_init(amifb_init);
-
-static void __exit amifb_exit(void)
-{
-       platform_driver_unregister(&amifb_driver);
-}
-
-module_exit(amifb_exit);
+module_platform_driver_probe(amifb_driver, amifb_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:amiga-video");
index 025428e04c33c7bb99a80f2310b5dfdf8c936c2b..98348ec0b3ce1f9ad342ceb7feadd0a0c6fdc3ba 100644 (file)
@@ -1158,18 +1158,7 @@ static struct platform_driver atmel_lcdfb_driver = {
        },
 };
 
-static int __init atmel_lcdfb_init(void)
-{
-       return platform_driver_probe(&atmel_lcdfb_driver, atmel_lcdfb_probe);
-}
-
-static void __exit atmel_lcdfb_exit(void)
-{
-       platform_driver_unregister(&atmel_lcdfb_driver);
-}
-
-module_init(atmel_lcdfb_init);
-module_exit(atmel_lcdfb_exit);
+module_platform_driver_probe(atmel_lcdfb_driver, atmel_lcdfb_probe);
 
 MODULE_DESCRIPTION("AT91/AT32 LCD Controller framebuffer driver");
 MODULE_AUTHOR("Nicolas Ferre <nicolas.ferre@atmel.com>");
index 10560efeb35ac24ae87d5a862b526c63b90e2375..5261229c79afbef8afa4e80f24936f6dbb6e6f4e 100644 (file)
@@ -397,18 +397,7 @@ static struct platform_driver vrfb_driver = {
        .remove         = __exit_p(vrfb_remove),
 };
 
-static int __init vrfb_init(void)
-{
-       return platform_driver_probe(&vrfb_driver, &vrfb_probe);
-}
-
-static void __exit vrfb_exit(void)
-{
-       platform_driver_unregister(&vrfb_driver);
-}
-
-module_init(vrfb_init);
-module_exit(vrfb_exit);
+module_platform_driver_probe(vrfb_driver, vrfb_probe);
 
 MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>");
 MODULE_DESCRIPTION("OMAP VRFB");
index 701b461cf8a953b602c676bd50d1e164267deb98..6cad53075e99321ae07696bab203088df1b5bc6e 100644 (file)
@@ -581,17 +581,7 @@ static struct platform_driver sh_mipi_driver = {
        },
 };
 
-static int __init sh_mipi_init(void)
-{
-       return platform_driver_probe(&sh_mipi_driver, sh_mipi_probe);
-}
-module_init(sh_mipi_init);
-
-static void __exit sh_mipi_exit(void)
-{
-       platform_driver_unregister(&sh_mipi_driver);
-}
-module_exit(sh_mipi_exit);
+module_platform_driver_probe(sh_mipi_driver, sh_mipi_probe);
 
 MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>");
 MODULE_DESCRIPTION("SuperH / ARM-shmobile MIPI DSI driver");
index 930e550e752ac5712b99dc4909de57d0ccd7fafd..bfe4728480fd9fb7909d1845dd50b3b753390a53 100644 (file)
@@ -1445,17 +1445,7 @@ static struct platform_driver sh_hdmi_driver = {
        },
 };
 
-static int __init sh_hdmi_init(void)
-{
-       return platform_driver_probe(&sh_hdmi_driver, sh_hdmi_probe);
-}
-module_init(sh_hdmi_init);
-
-static void __exit sh_hdmi_exit(void)
-{
-       platform_driver_unregister(&sh_hdmi_driver);
-}
-module_exit(sh_hdmi_exit);
+module_platform_driver_probe(sh_hdmi_driver, sh_hdmi_probe);
 
 MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>");
 MODULE_DESCRIPTION("SuperH / ARM-shmobile HDMI driver");