]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Input: twl4030-pwrbutton - use module_platform_driver_probe macro
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 18 Mar 2013 04:26:44 +0000 (21:26 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 18 Mar 2013 04:37:14 +0000 (21:37 -0700)
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/twl4030-pwrbutton.c

index 27c2bc8aa8907b3d97adab437341e3e814dab408..b9a05fda03e402c2d8e382626a890d6099604231 100644 (file)
@@ -114,18 +114,8 @@ static struct platform_driver twl4030_pwrbutton_driver = {
        },
 };
 
-static int __init twl4030_pwrbutton_init(void)
-{
-       return platform_driver_probe(&twl4030_pwrbutton_driver,
+module_platform_driver_probe(twl4030_pwrbutton_driver,
                        twl4030_pwrbutton_probe);
-}
-module_init(twl4030_pwrbutton_init);
-
-static void __exit twl4030_pwrbutton_exit(void)
-{
-       platform_driver_unregister(&twl4030_pwrbutton_driver);
-}
-module_exit(twl4030_pwrbutton_exit);
 
 MODULE_ALIAS("platform:twl4030_pwrbutton");
 MODULE_DESCRIPTION("Triton2 Power Button");