Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers: video: use module_platform_driver_probe()

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>

authored by

Fabio Porcedda and committed by
Tomi Valkeinen
3ccbf89f cd19965a

+5 -59
+1 -13
drivers/video/amifb.c
··· 3788 3788 }, 3789 3789 }; 3790 3790 3791 - static int __init amifb_init(void) 3792 - { 3793 - return platform_driver_probe(&amifb_driver, amifb_probe); 3794 - } 3795 - 3796 - module_init(amifb_init); 3797 - 3798 - static void __exit amifb_exit(void) 3799 - { 3800 - platform_driver_unregister(&amifb_driver); 3801 - } 3802 - 3803 - module_exit(amifb_exit); 3791 + module_platform_driver_probe(amifb_driver, amifb_probe); 3804 3792 3805 3793 MODULE_LICENSE("GPL"); 3806 3794 MODULE_ALIAS("platform:amiga-video");
+1 -12
drivers/video/atmel_lcdfb.c
··· 1158 1158 }, 1159 1159 }; 1160 1160 1161 - static int __init atmel_lcdfb_init(void) 1162 - { 1163 - return platform_driver_probe(&atmel_lcdfb_driver, atmel_lcdfb_probe); 1164 - } 1165 - 1166 - static void __exit atmel_lcdfb_exit(void) 1167 - { 1168 - platform_driver_unregister(&atmel_lcdfb_driver); 1169 - } 1170 - 1171 - module_init(atmel_lcdfb_init); 1172 - module_exit(atmel_lcdfb_exit); 1161 + module_platform_driver_probe(atmel_lcdfb_driver, atmel_lcdfb_probe); 1173 1162 1174 1163 MODULE_DESCRIPTION("AT91/AT32 LCD Controller framebuffer driver"); 1175 1164 MODULE_AUTHOR("Nicolas Ferre <nicolas.ferre@atmel.com>");
+1 -12
drivers/video/omap2/vrfb.c
··· 397 397 .remove = __exit_p(vrfb_remove), 398 398 }; 399 399 400 - static int __init vrfb_init(void) 401 - { 402 - return platform_driver_probe(&vrfb_driver, &vrfb_probe); 403 - } 404 - 405 - static void __exit vrfb_exit(void) 406 - { 407 - platform_driver_unregister(&vrfb_driver); 408 - } 409 - 410 - module_init(vrfb_init); 411 - module_exit(vrfb_exit); 400 + module_platform_driver_probe(vrfb_driver, vrfb_probe); 412 401 413 402 MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>"); 414 403 MODULE_DESCRIPTION("OMAP VRFB");
+1 -11
drivers/video/sh_mipi_dsi.c
··· 581 581 }, 582 582 }; 583 583 584 - static int __init sh_mipi_init(void) 585 - { 586 - return platform_driver_probe(&sh_mipi_driver, sh_mipi_probe); 587 - } 588 - module_init(sh_mipi_init); 589 - 590 - static void __exit sh_mipi_exit(void) 591 - { 592 - platform_driver_unregister(&sh_mipi_driver); 593 - } 594 - module_exit(sh_mipi_exit); 584 + module_platform_driver_probe(sh_mipi_driver, sh_mipi_probe); 595 585 596 586 MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>"); 597 587 MODULE_DESCRIPTION("SuperH / ARM-shmobile MIPI DSI driver");
+1 -11
drivers/video/sh_mobile_hdmi.c
··· 1445 1445 }, 1446 1446 }; 1447 1447 1448 - static int __init sh_hdmi_init(void) 1449 - { 1450 - return platform_driver_probe(&sh_hdmi_driver, sh_hdmi_probe); 1451 - } 1452 - module_init(sh_hdmi_init); 1453 - 1454 - static void __exit sh_hdmi_exit(void) 1455 - { 1456 - platform_driver_unregister(&sh_hdmi_driver); 1457 - } 1458 - module_exit(sh_hdmi_exit); 1448 + module_platform_driver_probe(sh_hdmi_driver, sh_hdmi_probe); 1459 1449 1460 1450 MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>"); 1461 1451 MODULE_DESCRIPTION("SuperH / ARM-shmobile HDMI driver");