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

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>

authored by

Axel Lin and committed by
Florian Tobias Schandinat
4277f2c4 9056df19

+14 -176
+1 -12
drivers/video/mxsfb.c
··· 902 902 }, 903 903 }; 904 904 905 - static int __init mxsfb_init(void) 906 - { 907 - return platform_driver_register(&mxsfb_driver); 908 - } 909 - 910 - static void __exit mxsfb_exit(void) 911 - { 912 - platform_driver_unregister(&mxsfb_driver); 913 - } 914 - 915 - module_init(mxsfb_init); 916 - module_exit(mxsfb_exit); 905 + module_platform_driver(mxsfb_devtype); 917 906 918 907 MODULE_DESCRIPTION("Freescale mxs framebuffer driver"); 919 908 MODULE_AUTHOR("Sascha Hauer, Pengutronix");
+1 -12
drivers/video/nuc900fb.c
··· 762 762 }, 763 763 }; 764 764 765 - int __devinit nuc900fb_init(void) 766 - { 767 - return platform_driver_register(&nuc900fb_driver); 768 - } 769 - 770 - static void __exit nuc900fb_cleanup(void) 771 - { 772 - platform_driver_unregister(&nuc900fb_driver); 773 - } 774 - 775 - module_init(nuc900fb_init); 776 - module_exit(nuc900fb_cleanup); 765 + module_platform_driver(nuc900fb_driver); 777 766 778 767 MODULE_DESCRIPTION("Framebuffer driver for the NUC900"); 779 768 MODULE_LICENSE("GPL");
+1 -11
drivers/video/pxa168fb.c
··· 832 832 .remove = __devexit_p(pxa168fb_remove), 833 833 }; 834 834 835 - static int __init pxa168fb_init(void) 836 - { 837 - return platform_driver_register(&pxa168fb_driver); 838 - } 839 - module_init(pxa168fb_init); 840 - 841 - static void __exit pxa168fb_exit(void) 842 - { 843 - platform_driver_unregister(&pxa168fb_driver); 844 - } 845 - module_exit(pxa168fb_exit); 835 + module_platform_driver(pxa168fb_driver); 846 836 847 837 MODULE_AUTHOR("Lennert Buytenhek <buytenh@marvell.com> " 848 838 "Green Wan <gwan@marvell.com>");
+1 -14
drivers/video/pxa3xx-gcu.c
··· 747 747 }, 748 748 }; 749 749 750 - static int __init 751 - pxa3xx_gcu_init(void) 752 - { 753 - return platform_driver_register(&pxa3xx_gcu_driver); 754 - } 755 - 756 - static void __exit 757 - pxa3xx_gcu_exit(void) 758 - { 759 - platform_driver_unregister(&pxa3xx_gcu_driver); 760 - } 761 - 762 - module_init(pxa3xx_gcu_init); 763 - module_exit(pxa3xx_gcu_exit); 750 + module_platform_driver(pxa3xx_gcu_driver); 764 751 765 752 MODULE_DESCRIPTION("PXA3xx graphics controller unit driver"); 766 753 MODULE_LICENSE("GPL");
+1 -12
drivers/video/s3c-fb.c
··· 2003 2003 }, 2004 2004 }; 2005 2005 2006 - static int __init s3c_fb_init(void) 2007 - { 2008 - return platform_driver_register(&s3c_fb_driver); 2009 - } 2010 - 2011 - static void __exit s3c_fb_cleanup(void) 2012 - { 2013 - platform_driver_unregister(&s3c_fb_driver); 2014 - } 2015 - 2016 - module_init(s3c_fb_init); 2017 - module_exit(s3c_fb_cleanup); 2006 + module_platform_driver(s3c_fb_driver); 2018 2007 2019 2008 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); 2020 2009 MODULE_DESCRIPTION("Samsung S3C SoC Framebuffer driver");
+1 -12
drivers/video/sh7760fb.c
··· 585 585 .remove = __devexit_p(sh7760fb_remove), 586 586 }; 587 587 588 - static int __init sh7760fb_init(void) 589 - { 590 - return platform_driver_register(&sh7760_lcdc_driver); 591 - } 592 - 593 - static void __exit sh7760fb_exit(void) 594 - { 595 - platform_driver_unregister(&sh7760_lcdc_driver); 596 - } 597 - 598 - module_init(sh7760fb_init); 599 - module_exit(sh7760fb_exit); 588 + module_platform_driver(sh7760_lcdc_driver); 600 589 601 590 MODULE_AUTHOR("Nobuhiro Iwamatsu, Manuel Lauss"); 602 591 MODULE_DESCRIPTION("FBdev for SH7760/63 integrated LCD Controller");
+1 -12
drivers/video/sh_mobile_lcdcfb.c
··· 1709 1709 .remove = sh_mobile_lcdc_remove, 1710 1710 }; 1711 1711 1712 - static int __init sh_mobile_lcdc_init(void) 1713 - { 1714 - return platform_driver_register(&sh_mobile_lcdc_driver); 1715 - } 1716 - 1717 - static void __exit sh_mobile_lcdc_exit(void) 1718 - { 1719 - platform_driver_unregister(&sh_mobile_lcdc_driver); 1720 - } 1721 - 1722 - module_init(sh_mobile_lcdc_init); 1723 - module_exit(sh_mobile_lcdc_exit); 1712 + module_platform_driver(sh_mobile_lcdc_driver); 1724 1713 1725 1714 MODULE_DESCRIPTION("SuperH Mobile LCDC Framebuffer driver"); 1726 1715 MODULE_AUTHOR("Magnus Damm <damm@opensource.se>");
+1 -12
drivers/video/sh_mobile_meram.c
··· 679 679 .remove = sh_mobile_meram_remove, 680 680 }; 681 681 682 - static int __init sh_mobile_meram_init(void) 683 - { 684 - return platform_driver_register(&sh_mobile_meram_driver); 685 - } 686 - 687 - static void __exit sh_mobile_meram_exit(void) 688 - { 689 - platform_driver_unregister(&sh_mobile_meram_driver); 690 - } 691 - 692 - module_init(sh_mobile_meram_init); 693 - module_exit(sh_mobile_meram_exit); 682 + module_platform_driver(sh_mobile_meram_driver); 694 683 695 684 MODULE_DESCRIPTION("SuperH Mobile MERAM driver"); 696 685 MODULE_AUTHOR("Damian Hobson-Garcia / Takanari Hayama");
+1 -12
drivers/video/sm501fb.c
··· 2230 2230 }, 2231 2231 }; 2232 2232 2233 - static int __devinit sm501fb_init(void) 2234 - { 2235 - return platform_driver_register(&sm501fb_driver); 2236 - } 2237 - 2238 - static void __exit sm501fb_cleanup(void) 2239 - { 2240 - platform_driver_unregister(&sm501fb_driver); 2241 - } 2242 - 2243 - module_init(sm501fb_init); 2244 - module_exit(sm501fb_cleanup); 2233 + module_platform_driver(sm501fb_driver); 2245 2234 2246 2235 module_param_named(mode, fb_mode, charp, 0); 2247 2236 MODULE_PARM_DESC(mode,
+1 -12
drivers/video/vt8500lcdfb.c
··· 457 457 }, 458 458 }; 459 459 460 - static int __init vt8500lcd_init(void) 461 - { 462 - return platform_driver_register(&vt8500lcd_driver); 463 - } 464 - 465 - static void __exit vt8500lcd_exit(void) 466 - { 467 - platform_driver_unregister(&vt8500lcd_driver); 468 - } 469 - 470 - module_init(vt8500lcd_init); 471 - module_exit(vt8500lcd_exit); 460 + module_platform_driver(vt8500lcd_driver); 472 461 473 462 MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com>"); 474 463 MODULE_DESCRIPTION("LCD controller driver for VIA VT8500");
+1 -12
drivers/video/w100fb.c
··· 1620 1620 }, 1621 1621 }; 1622 1622 1623 - int __init w100fb_init(void) 1624 - { 1625 - return platform_driver_register(&w100fb_driver); 1626 - } 1627 - 1628 - void __exit w100fb_cleanup(void) 1629 - { 1630 - platform_driver_unregister(&w100fb_driver); 1631 - } 1632 - 1633 - module_init(w100fb_init); 1634 - module_exit(w100fb_cleanup); 1623 + module_platform_driver(w100fb_driver); 1635 1624 1636 1625 MODULE_DESCRIPTION("ATI Imageon w100 framebuffer driver"); 1637 1626 MODULE_LICENSE("GPL");
+1 -12
drivers/video/wm8505fb.c
··· 404 404 }, 405 405 }; 406 406 407 - static int __init wm8505fb_init(void) 408 - { 409 - return platform_driver_register(&wm8505fb_driver); 410 - } 411 - 412 - static void __exit wm8505fb_exit(void) 413 - { 414 - platform_driver_unregister(&wm8505fb_driver); 415 - } 416 - 417 - module_init(wm8505fb_init); 418 - module_exit(wm8505fb_exit); 407 + module_platform_driver(wm8505fb_driver); 419 408 420 409 MODULE_AUTHOR("Ed Spiridonov <edo.rus@gmail.com>"); 421 410 MODULE_DESCRIPTION("Framebuffer driver for WMT WM8505");
+1 -12
drivers/video/wmt_ge_rops.c
··· 167 167 }, 168 168 }; 169 169 170 - static int __init wmt_ge_rops_init(void) 171 - { 172 - return platform_driver_register(&wmt_ge_rops_driver); 173 - } 174 - 175 - static void __exit wmt_ge_rops_exit(void) 176 - { 177 - platform_driver_unregister(&wmt_ge_rops_driver); 178 - } 179 - 180 - module_init(wmt_ge_rops_init); 181 - module_exit(wmt_ge_rops_exit); 170 + module_platform_driver(wmt_ge_rops_driver); 182 171 183 172 MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com"); 184 173 MODULE_DESCRIPTION("Accelerators for raster operations using "
+1 -19
drivers/video/xilinxfb.c
··· 511 511 }, 512 512 }; 513 513 514 - 515 - /* --------------------------------------------------------------------- 516 - * Module setup and teardown 517 - */ 518 - 519 - static int __init 520 - xilinxfb_init(void) 521 - { 522 - return platform_driver_register(&xilinxfb_of_driver); 523 - } 524 - 525 - static void __exit 526 - xilinxfb_cleanup(void) 527 - { 528 - platform_driver_unregister(&xilinxfb_of_driver); 529 - } 530 - 531 - module_init(xilinxfb_init); 532 - module_exit(xilinxfb_cleanup); 514 + module_platform_driver(xilinxfb_of_driver); 533 515 534 516 MODULE_AUTHOR("MontaVista Software, Inc. <source@mvista.com>"); 535 517 MODULE_DESCRIPTION("Xilinx TFT frame buffer driver");