From: Sachin Kamat Date: Tue, 3 Jul 2012 11:47:51 +0000 (+0800) Subject: leds: Use module_platform_driver() in leds-max8997.c file X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7fafefb86e4d48464b79c125b37b9d472ba253ab;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git leds: Use module_platform_driver() in leds-max8997.c file module_platform_driver() makes the code simpler. Signed-off-by: Sachin Kamat Signed-off-by: Bryan Wu --- 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 "); MODULE_DESCRIPTION("MAX8997 LED driver");