diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-10 18:09:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 19:30:48 -0500 |
commit | 09a0d183ef3d310ee9d0b835d9db741fda9d6d46 (patch) | |
tree | 8ccf315879a3152eba11961885f5f589088dc9da /drivers/leds/leds-lp3944.c | |
parent | 892a8843fbef07a7f2ab62d5f7ff5c16ea0903b0 (diff) |
leds: convert led i2c drivers to module_i2c_driver
Factor out some boilerplate code for i2c driver registration
into module_i2c_driver.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Haojian Zhuang <hzhuang1@marvell.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/leds/leds-lp3944.c')
-rw-r--r-- | drivers/leds/leds-lp3944.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/leds/leds-lp3944.c b/drivers/leds/leds-lp3944.c index 9010c054615e..b8f9f0a5d431 100644 --- a/drivers/leds/leds-lp3944.c +++ b/drivers/leds/leds-lp3944.c | |||
@@ -453,18 +453,7 @@ static struct i2c_driver lp3944_driver = { | |||
453 | .id_table = lp3944_id, | 453 | .id_table = lp3944_id, |
454 | }; | 454 | }; |
455 | 455 | ||
456 | static int __init lp3944_module_init(void) | 456 | module_i2c_driver(lp3944_driver); |
457 | { | ||
458 | return i2c_add_driver(&lp3944_driver); | ||
459 | } | ||
460 | |||
461 | static void __exit lp3944_module_exit(void) | ||
462 | { | ||
463 | i2c_del_driver(&lp3944_driver); | ||
464 | } | ||
465 | |||
466 | module_init(lp3944_module_init); | ||
467 | module_exit(lp3944_module_exit); | ||
468 | 457 | ||
469 | MODULE_AUTHOR("Antonio Ospite <ospite@studenti.unina.it>"); | 458 | MODULE_AUTHOR("Antonio Ospite <ospite@studenti.unina.it>"); |
470 | MODULE_DESCRIPTION("LP3944 Fun Light Chip"); | 459 | MODULE_DESCRIPTION("LP3944 Fun Light Chip"); |