]> git.karo-electronics.de Git - linux-beck.git/commitdiff
leds: Use module_platform_driver() in leds-max8997.c file
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 3 Jul 2012 11:47:51 +0000 (19:47 +0800)
committerBryan Wu <bryan.wu@canonical.com>
Mon, 23 Jul 2012 23:52:36 +0000 (07:52 +0800)
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>
drivers/leds/leds-max8997.c

index f4c0e37fad1e06e612e99936d761985b026f581a..86abfe24ad28394c9301e5a9eee7459469a0a157 100644 (file)
@@ -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");