diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-07-03 13:47:51 +0200 |
---|---|---|
committer | Bryan Wu <bryan.wu@canonical.com> | 2012-07-24 01:52:36 +0200 |
commit | 7fafefb86e4d48464b79c125b37b9d472ba253ab (patch) | |
tree | 958e6d126849bc329ec701d50a55298e7b1d4078 /drivers/leds/leds-max8997.c | |
parent | leds: convert tca6507 driver to module_i2c_driver() (diff) | |
download | linux-7fafefb86e4d48464b79c125b37b9d472ba253ab.tar.xz linux-7fafefb86e4d48464b79c125b37b9d472ba253ab.zip |
leds: Use module_platform_driver() in leds-max8997.c file
module_platform_driver() makes the code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Diffstat (limited to 'drivers/leds/leds-max8997.c')
-rw-r--r-- | drivers/leds/leds-max8997.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/leds/leds-max8997.c b/drivers/leds/leds-max8997.c index f4c0e37fad1e..86abfe24ad28 100644 --- a/drivers/leds/leds-max8997.c +++ b/drivers/leds/leds-max8997.c @@ -354,17 +354,7 @@ static struct platform_driver max8997_led_driver = { .remove = __devexit_p(max8997_led_remove), }; -static int __init max8997_led_init(void) -{ - return platform_driver_register(&max8997_led_driver); -} -module_init(max8997_led_init); - -static void __exit max8997_led_exit(void) -{ - platform_driver_unregister(&max8997_led_driver); -} -module_exit(max8997_led_exit); +module_platform_driver(max8997_led_driver); MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>"); MODULE_DESCRIPTION("MAX8997 LED driver"); |