backlight: convert backlight spi drivers to module_spi_driver
authorAxel Lin <axel.lin@gmail.com>
Fri, 23 Mar 2012 22:01:59 +0000 (15:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Mar 2012 23:58:33 +0000 (16:58 -0700)
Factor out some boilerplate code for spi driver registration into
module_spi_driver.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Acked-by: Alberto Panizzo <alberto@amarulasolutions.com>
Cc: Donghwa Lee <dh09.lee@samsung.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/backlight/ams369fg06.c
drivers/video/backlight/corgi_lcd.c
drivers/video/backlight/l4f00242t03.c
drivers/video/backlight/ld9040.c
drivers/video/backlight/lms283gf05.c
drivers/video/backlight/ltv350qv.c
drivers/video/backlight/s6e63m0.c
drivers/video/backlight/tdo24m.c
drivers/video/backlight/tosa_lcd.c
drivers/video/backlight/vgg2432a4.c

index 7838a23fbdd124fb8c2b639092708a35892f8bb9..7bdadc790117c977e5b23727eb70dac4fac51309 100644 (file)
@@ -629,18 +629,7 @@ static struct spi_driver ams369fg06_driver = {
        .resume         = ams369fg06_resume,
 };
 
-static int __init ams369fg06_init(void)
-{
-       return spi_register_driver(&ams369fg06_driver);
-}
-
-static void __exit ams369fg06_exit(void)
-{
-       spi_unregister_driver(&ams369fg06_driver);
-}
-
-module_init(ams369fg06_init);
-module_exit(ams369fg06_exit);
+module_spi_driver(ams369fg06_driver);
 
 MODULE_AUTHOR("Jingoo Han <jg1.han@samsung.com>");
 MODULE_DESCRIPTION("ams369fg06 LCD Driver");
index c6533bad26f86cb647792198cf4de02446cd64a8..6dab13fe562ee8ed2a43fd42370b68eb81d76a15 100644 (file)
@@ -629,17 +629,7 @@ static struct spi_driver corgi_lcd_driver = {
        .resume         = corgi_lcd_resume,
 };
 
-static int __init corgi_lcd_init(void)
-{
-       return spi_register_driver(&corgi_lcd_driver);
-}
-module_init(corgi_lcd_init);
-
-static void __exit corgi_lcd_exit(void)
-{
-       spi_unregister_driver(&corgi_lcd_driver);
-}
-module_exit(corgi_lcd_exit);
+module_spi_driver(corgi_lcd_driver);
 
 MODULE_DESCRIPTION("LCD and backlight driver for SHARP C7x0/Cxx00");
 MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>");
index 27d1d7a29c77ef501c29a043b309ce7f4bb290db..6022b67285ecd63e9bb799e082bb00a4e445ff52 100644 (file)
@@ -274,18 +274,7 @@ static struct spi_driver l4f00242t03_driver = {
        .shutdown       = l4f00242t03_shutdown,
 };
 
-static __init int l4f00242t03_init(void)
-{
-       return spi_register_driver(&l4f00242t03_driver);
-}
-
-static __exit void l4f00242t03_exit(void)
-{
-       spi_unregister_driver(&l4f00242t03_driver);
-}
-
-module_init(l4f00242t03_init);
-module_exit(l4f00242t03_exit);
+module_spi_driver(l4f00242t03_driver);
 
 MODULE_AUTHOR("Alberto Panizzo <maramaopercheseimorto@gmail.com>");
 MODULE_DESCRIPTION("EPSON L4F00242T03 LCD");
index 78dafc0c8fc5a1ec4830d04660d5914441e4fe09..efd352be21ae44a553cf8735392261d90552ff19 100644 (file)
@@ -856,18 +856,7 @@ static struct spi_driver ld9040_driver = {
        .resume         = ld9040_resume,
 };
 
-static int __init ld9040_init(void)
-{
-       return spi_register_driver(&ld9040_driver);
-}
-
-static void __exit ld9040_exit(void)
-{
-       spi_unregister_driver(&ld9040_driver);
-}
-
-module_init(ld9040_init);
-module_exit(ld9040_exit);
+module_spi_driver(ld9040_driver);
 
 MODULE_AUTHOR("Donghwa Lee <dh09.lee@samsung.com>");
 MODULE_DESCRIPTION("ld9040 LCD Driver");
index 4ec78cfe26eaf160f8c5746e019da9cd68327127..4161f9e3982a2a544120142f100e45afa34b5d2c 100644 (file)
@@ -226,18 +226,7 @@ static struct spi_driver lms283gf05_driver = {
        .remove         = __devexit_p(lms283gf05_remove),
 };
 
-static __init int lms283gf05_init(void)
-{
-       return spi_register_driver(&lms283gf05_driver);
-}
-
-static __exit void lms283gf05_exit(void)
-{
-       spi_unregister_driver(&lms283gf05_driver);
-}
-
-module_init(lms283gf05_init);
-module_exit(lms283gf05_exit);
+module_spi_driver(lms283gf05_driver);
 
 MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
 MODULE_DESCRIPTION("LCD283GF05 LCD");
index cca43c06d3c851bf351c6db31971c3c9aae46f80..333949ff3265200f716112be2afaa79e5c480e43 100644 (file)
@@ -321,17 +321,7 @@ static struct spi_driver ltv350qv_driver = {
        .resume         = ltv350qv_resume,
 };
 
-static int __init ltv350qv_init(void)
-{
-       return spi_register_driver(&ltv350qv_driver);
-}
-
-static void __exit ltv350qv_exit(void)
-{
-       spi_unregister_driver(&ltv350qv_driver);
-}
-module_init(ltv350qv_init);
-module_exit(ltv350qv_exit);
+module_spi_driver(ltv350qv_driver);
 
 MODULE_AUTHOR("Haavard Skinnemoen (Atmel)");
 MODULE_DESCRIPTION("Samsung LTV350QV LCD Driver");
index 516db703dd24efa4e89a23d3d6ec3de2c432a693..e264f55b257426bd342b9943ee80530af760ce68 100644 (file)
@@ -909,18 +909,7 @@ static struct spi_driver s6e63m0_driver = {
        .resume         = s6e63m0_resume,
 };
 
-static int __init s6e63m0_init(void)
-{
-       return spi_register_driver(&s6e63m0_driver);
-}
-
-static void __exit s6e63m0_exit(void)
-{
-       spi_unregister_driver(&s6e63m0_driver);
-}
-
-module_init(s6e63m0_init);
-module_exit(s6e63m0_exit);
+module_spi_driver(s6e63m0_driver);
 
 MODULE_AUTHOR("InKi Dae <inki.dae@samsung.com>");
 MODULE_DESCRIPTION("S6E63M0 LCD Driver");
index 1997e12a105783d0b3d40a4310cebcdacc826906..2368b8e5f89e99e6248e4f3eab7f7eda27f58e13 100644 (file)
@@ -459,17 +459,7 @@ static struct spi_driver tdo24m_driver = {
        .resume         = tdo24m_resume,
 };
 
-static int __init tdo24m_init(void)
-{
-       return spi_register_driver(&tdo24m_driver);
-}
-module_init(tdo24m_init);
-
-static void __exit tdo24m_exit(void)
-{
-       spi_unregister_driver(&tdo24m_driver);
-}
-module_exit(tdo24m_exit);
+module_spi_driver(tdo24m_driver);
 
 MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>");
 MODULE_DESCRIPTION("Driver for Toppoly TDO24M LCD Panel");
index 772f6015219a91764a78a481071b2830824e4272..a2161f631a831f66992d4d84b9756c56b384de3f 100644 (file)
@@ -285,18 +285,7 @@ static struct spi_driver tosa_lcd_driver = {
        .resume         = tosa_lcd_resume,
 };
 
-static int __init tosa_lcd_init(void)
-{
-       return spi_register_driver(&tosa_lcd_driver);
-}
-
-static void __exit tosa_lcd_exit(void)
-{
-       spi_unregister_driver(&tosa_lcd_driver);
-}
-
-module_init(tosa_lcd_init);
-module_exit(tosa_lcd_exit);
+module_spi_driver(tosa_lcd_driver);
 
 MODULE_AUTHOR("Dmitry Baryshkov");
 MODULE_LICENSE("GPL v2");
index b49063c831e76ca57811ab0afe23652ade90be46..b617fae9aa26f730d25edf4b56e909488391e3ab 100644 (file)
@@ -262,20 +262,7 @@ static struct spi_driver vgg2432a4_driver = {
        .resume         = vgg2432a4_resume,
 };
 
-/* Device driver initialisation */
-
-static int __init vgg2432a4_init(void)
-{
-       return spi_register_driver(&vgg2432a4_driver);
-}
-
-static void __exit vgg2432a4_exit(void)
-{
-       spi_unregister_driver(&vgg2432a4_driver);
-}
-
-module_init(vgg2432a4_init);
-module_exit(vgg2432a4_exit);
+module_spi_driver(vgg2432a4_driver);
 
 MODULE_AUTHOR("Ben Dooks <ben-linux@fluff.org>");
 MODULE_DESCRIPTION("VGG2432A4 LCD Driver");