diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-23 18:01:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 19:58:33 -0400 |
commit | 462dd83833065a6b3add3f102f4fe69efa1422e9 (patch) | |
tree | afd0eb1eab23008c058d7811b3d3e3c6e1917247 | |
parent | 81ce6864444facc95ba7fe25575153425106c985 (diff) |
backlight: convert backlight spi drivers to module_spi_driver
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>
-rw-r--r-- | drivers/video/backlight/ams369fg06.c | 13 | ||||
-rw-r--r-- | drivers/video/backlight/corgi_lcd.c | 12 | ||||
-rw-r--r-- | drivers/video/backlight/l4f00242t03.c | 13 | ||||
-rw-r--r-- | drivers/video/backlight/ld9040.c | 13 | ||||
-rw-r--r-- | drivers/video/backlight/lms283gf05.c | 13 | ||||
-rw-r--r-- | drivers/video/backlight/ltv350qv.c | 12 | ||||
-rw-r--r-- | drivers/video/backlight/s6e63m0.c | 13 | ||||
-rw-r--r-- | drivers/video/backlight/tdo24m.c | 12 | ||||
-rw-r--r-- | drivers/video/backlight/tosa_lcd.c | 13 | ||||
-rw-r--r-- | drivers/video/backlight/vgg2432a4.c | 15 |
10 files changed, 10 insertions, 119 deletions
diff --git a/drivers/video/backlight/ams369fg06.c b/drivers/video/backlight/ams369fg06.c index 7838a23fbdd1..7bdadc790117 100644 --- a/drivers/video/backlight/ams369fg06.c +++ b/drivers/video/backlight/ams369fg06.c | |||
@@ -629,18 +629,7 @@ static struct spi_driver ams369fg06_driver = { | |||
629 | .resume = ams369fg06_resume, | 629 | .resume = ams369fg06_resume, |
630 | }; | 630 | }; |
631 | 631 | ||
632 | static int __init ams369fg06_init(void) | 632 | module_spi_driver(ams369fg06_driver); |
633 | { | ||
634 | return spi_register_driver(&ams369fg06_driver); | ||
635 | } | ||
636 | |||
637 | static void __exit ams369fg06_exit(void) | ||
638 | { | ||
639 | spi_unregister_driver(&ams369fg06_driver); | ||
640 | } | ||
641 | |||
642 | module_init(ams369fg06_init); | ||
643 | module_exit(ams369fg06_exit); | ||
644 | 633 | ||
645 | MODULE_AUTHOR("Jingoo Han <jg1.han@samsung.com>"); | 634 | MODULE_AUTHOR("Jingoo Han <jg1.han@samsung.com>"); |
646 | MODULE_DESCRIPTION("ams369fg06 LCD Driver"); | 635 | MODULE_DESCRIPTION("ams369fg06 LCD Driver"); |
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c index c6533bad26f8..6dab13fe562e 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c | |||
@@ -629,17 +629,7 @@ static struct spi_driver corgi_lcd_driver = { | |||
629 | .resume = corgi_lcd_resume, | 629 | .resume = corgi_lcd_resume, |
630 | }; | 630 | }; |
631 | 631 | ||
632 | static int __init corgi_lcd_init(void) | 632 | module_spi_driver(corgi_lcd_driver); |
633 | { | ||
634 | return spi_register_driver(&corgi_lcd_driver); | ||
635 | } | ||
636 | module_init(corgi_lcd_init); | ||
637 | |||
638 | static void __exit corgi_lcd_exit(void) | ||
639 | { | ||
640 | spi_unregister_driver(&corgi_lcd_driver); | ||
641 | } | ||
642 | module_exit(corgi_lcd_exit); | ||
643 | 633 | ||
644 | MODULE_DESCRIPTION("LCD and backlight driver for SHARP C7x0/Cxx00"); | 634 | MODULE_DESCRIPTION("LCD and backlight driver for SHARP C7x0/Cxx00"); |
645 | MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>"); | 635 | MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>"); |
diff --git a/drivers/video/backlight/l4f00242t03.c b/drivers/video/backlight/l4f00242t03.c index 27d1d7a29c77..6022b67285ec 100644 --- a/drivers/video/backlight/l4f00242t03.c +++ b/drivers/video/backlight/l4f00242t03.c | |||
@@ -274,18 +274,7 @@ static struct spi_driver l4f00242t03_driver = { | |||
274 | .shutdown = l4f00242t03_shutdown, | 274 | .shutdown = l4f00242t03_shutdown, |
275 | }; | 275 | }; |
276 | 276 | ||
277 | static __init int l4f00242t03_init(void) | 277 | module_spi_driver(l4f00242t03_driver); |
278 | { | ||
279 | return spi_register_driver(&l4f00242t03_driver); | ||
280 | } | ||
281 | |||
282 | static __exit void l4f00242t03_exit(void) | ||
283 | { | ||
284 | spi_unregister_driver(&l4f00242t03_driver); | ||
285 | } | ||
286 | |||
287 | module_init(l4f00242t03_init); | ||
288 | module_exit(l4f00242t03_exit); | ||
289 | 278 | ||
290 | MODULE_AUTHOR("Alberto Panizzo <maramaopercheseimorto@gmail.com>"); | 279 | MODULE_AUTHOR("Alberto Panizzo <maramaopercheseimorto@gmail.com>"); |
291 | MODULE_DESCRIPTION("EPSON L4F00242T03 LCD"); | 280 | MODULE_DESCRIPTION("EPSON L4F00242T03 LCD"); |
diff --git a/drivers/video/backlight/ld9040.c b/drivers/video/backlight/ld9040.c index 78dafc0c8fc5..efd352be21ae 100644 --- a/drivers/video/backlight/ld9040.c +++ b/drivers/video/backlight/ld9040.c | |||
@@ -856,18 +856,7 @@ static struct spi_driver ld9040_driver = { | |||
856 | .resume = ld9040_resume, | 856 | .resume = ld9040_resume, |
857 | }; | 857 | }; |
858 | 858 | ||
859 | static int __init ld9040_init(void) | 859 | module_spi_driver(ld9040_driver); |
860 | { | ||
861 | return spi_register_driver(&ld9040_driver); | ||
862 | } | ||
863 | |||
864 | static void __exit ld9040_exit(void) | ||
865 | { | ||
866 | spi_unregister_driver(&ld9040_driver); | ||
867 | } | ||
868 | |||
869 | module_init(ld9040_init); | ||
870 | module_exit(ld9040_exit); | ||
871 | 860 | ||
872 | MODULE_AUTHOR("Donghwa Lee <dh09.lee@samsung.com>"); | 861 | MODULE_AUTHOR("Donghwa Lee <dh09.lee@samsung.com>"); |
873 | MODULE_DESCRIPTION("ld9040 LCD Driver"); | 862 | MODULE_DESCRIPTION("ld9040 LCD Driver"); |
diff --git a/drivers/video/backlight/lms283gf05.c b/drivers/video/backlight/lms283gf05.c index 4ec78cfe26ea..4161f9e3982a 100644 --- a/drivers/video/backlight/lms283gf05.c +++ b/drivers/video/backlight/lms283gf05.c | |||
@@ -226,18 +226,7 @@ static struct spi_driver lms283gf05_driver = { | |||
226 | .remove = __devexit_p(lms283gf05_remove), | 226 | .remove = __devexit_p(lms283gf05_remove), |
227 | }; | 227 | }; |
228 | 228 | ||
229 | static __init int lms283gf05_init(void) | 229 | module_spi_driver(lms283gf05_driver); |
230 | { | ||
231 | return spi_register_driver(&lms283gf05_driver); | ||
232 | } | ||
233 | |||
234 | static __exit void lms283gf05_exit(void) | ||
235 | { | ||
236 | spi_unregister_driver(&lms283gf05_driver); | ||
237 | } | ||
238 | |||
239 | module_init(lms283gf05_init); | ||
240 | module_exit(lms283gf05_exit); | ||
241 | 230 | ||
242 | MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); | 231 | MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); |
243 | MODULE_DESCRIPTION("LCD283GF05 LCD"); | 232 | MODULE_DESCRIPTION("LCD283GF05 LCD"); |
diff --git a/drivers/video/backlight/ltv350qv.c b/drivers/video/backlight/ltv350qv.c index cca43c06d3c8..333949ff3265 100644 --- a/drivers/video/backlight/ltv350qv.c +++ b/drivers/video/backlight/ltv350qv.c | |||
@@ -321,17 +321,7 @@ static struct spi_driver ltv350qv_driver = { | |||
321 | .resume = ltv350qv_resume, | 321 | .resume = ltv350qv_resume, |
322 | }; | 322 | }; |
323 | 323 | ||
324 | static int __init ltv350qv_init(void) | 324 | module_spi_driver(ltv350qv_driver); |
325 | { | ||
326 | return spi_register_driver(<v350qv_driver); | ||
327 | } | ||
328 | |||
329 | static void __exit ltv350qv_exit(void) | ||
330 | { | ||
331 | spi_unregister_driver(<v350qv_driver); | ||
332 | } | ||
333 | module_init(ltv350qv_init); | ||
334 | module_exit(ltv350qv_exit); | ||
335 | 325 | ||
336 | MODULE_AUTHOR("Haavard Skinnemoen (Atmel)"); | 326 | MODULE_AUTHOR("Haavard Skinnemoen (Atmel)"); |
337 | MODULE_DESCRIPTION("Samsung LTV350QV LCD Driver"); | 327 | MODULE_DESCRIPTION("Samsung LTV350QV LCD Driver"); |
diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c index 516db703dd24..e264f55b2574 100644 --- a/drivers/video/backlight/s6e63m0.c +++ b/drivers/video/backlight/s6e63m0.c | |||
@@ -909,18 +909,7 @@ static struct spi_driver s6e63m0_driver = { | |||
909 | .resume = s6e63m0_resume, | 909 | .resume = s6e63m0_resume, |
910 | }; | 910 | }; |
911 | 911 | ||
912 | static int __init s6e63m0_init(void) | 912 | module_spi_driver(s6e63m0_driver); |
913 | { | ||
914 | return spi_register_driver(&s6e63m0_driver); | ||
915 | } | ||
916 | |||
917 | static void __exit s6e63m0_exit(void) | ||
918 | { | ||
919 | spi_unregister_driver(&s6e63m0_driver); | ||
920 | } | ||
921 | |||
922 | module_init(s6e63m0_init); | ||
923 | module_exit(s6e63m0_exit); | ||
924 | 913 | ||
925 | MODULE_AUTHOR("InKi Dae <inki.dae@samsung.com>"); | 914 | MODULE_AUTHOR("InKi Dae <inki.dae@samsung.com>"); |
926 | MODULE_DESCRIPTION("S6E63M0 LCD Driver"); | 915 | MODULE_DESCRIPTION("S6E63M0 LCD Driver"); |
diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c index 1997e12a1057..2368b8e5f89e 100644 --- a/drivers/video/backlight/tdo24m.c +++ b/drivers/video/backlight/tdo24m.c | |||
@@ -459,17 +459,7 @@ static struct spi_driver tdo24m_driver = { | |||
459 | .resume = tdo24m_resume, | 459 | .resume = tdo24m_resume, |
460 | }; | 460 | }; |
461 | 461 | ||
462 | static int __init tdo24m_init(void) | 462 | module_spi_driver(tdo24m_driver); |
463 | { | ||
464 | return spi_register_driver(&tdo24m_driver); | ||
465 | } | ||
466 | module_init(tdo24m_init); | ||
467 | |||
468 | static void __exit tdo24m_exit(void) | ||
469 | { | ||
470 | spi_unregister_driver(&tdo24m_driver); | ||
471 | } | ||
472 | module_exit(tdo24m_exit); | ||
473 | 463 | ||
474 | MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>"); | 464 | MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>"); |
475 | MODULE_DESCRIPTION("Driver for Toppoly TDO24M LCD Panel"); | 465 | MODULE_DESCRIPTION("Driver for Toppoly TDO24M LCD Panel"); |
diff --git a/drivers/video/backlight/tosa_lcd.c b/drivers/video/backlight/tosa_lcd.c index 772f6015219a..a2161f631a83 100644 --- a/drivers/video/backlight/tosa_lcd.c +++ b/drivers/video/backlight/tosa_lcd.c | |||
@@ -285,18 +285,7 @@ static struct spi_driver tosa_lcd_driver = { | |||
285 | .resume = tosa_lcd_resume, | 285 | .resume = tosa_lcd_resume, |
286 | }; | 286 | }; |
287 | 287 | ||
288 | static int __init tosa_lcd_init(void) | 288 | module_spi_driver(tosa_lcd_driver); |
289 | { | ||
290 | return spi_register_driver(&tosa_lcd_driver); | ||
291 | } | ||
292 | |||
293 | static void __exit tosa_lcd_exit(void) | ||
294 | { | ||
295 | spi_unregister_driver(&tosa_lcd_driver); | ||
296 | } | ||
297 | |||
298 | module_init(tosa_lcd_init); | ||
299 | module_exit(tosa_lcd_exit); | ||
300 | 289 | ||
301 | MODULE_AUTHOR("Dmitry Baryshkov"); | 290 | MODULE_AUTHOR("Dmitry Baryshkov"); |
302 | MODULE_LICENSE("GPL v2"); | 291 | MODULE_LICENSE("GPL v2"); |
diff --git a/drivers/video/backlight/vgg2432a4.c b/drivers/video/backlight/vgg2432a4.c index b49063c831e7..b617fae9aa26 100644 --- a/drivers/video/backlight/vgg2432a4.c +++ b/drivers/video/backlight/vgg2432a4.c | |||
@@ -262,20 +262,7 @@ static struct spi_driver vgg2432a4_driver = { | |||
262 | .resume = vgg2432a4_resume, | 262 | .resume = vgg2432a4_resume, |
263 | }; | 263 | }; |
264 | 264 | ||
265 | /* Device driver initialisation */ | 265 | module_spi_driver(vgg2432a4_driver); |
266 | |||
267 | static int __init vgg2432a4_init(void) | ||
268 | { | ||
269 | return spi_register_driver(&vgg2432a4_driver); | ||
270 | } | ||
271 | |||
272 | static void __exit vgg2432a4_exit(void) | ||
273 | { | ||
274 | spi_unregister_driver(&vgg2432a4_driver); | ||
275 | } | ||
276 | |||
277 | module_init(vgg2432a4_init); | ||
278 | module_exit(vgg2432a4_exit); | ||
279 | 266 | ||
280 | MODULE_AUTHOR("Ben Dooks <ben-linux@fluff.org>"); | 267 | MODULE_AUTHOR("Ben Dooks <ben-linux@fluff.org>"); |
281 | MODULE_DESCRIPTION("VGG2432A4 LCD Driver"); | 268 | MODULE_DESCRIPTION("VGG2432A4 LCD Driver"); |