diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-03-18 00:26:44 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-03-18 00:37:14 -0400 |
commit | 8c0aafe07721a3807f08d2a30abc1b04f01aa48b (patch) | |
tree | 174ec6ff994ee23bd2b594c30723bc523a32ac2d /drivers/input/misc | |
parent | 6b0bc60b8b87be28f00dc71e624bd693d830bf74 (diff) |
Input: twl4030-pwrbutton - use module_platform_driver_probe macro
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>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r-- | drivers/input/misc/twl4030-pwrbutton.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c index 27c2bc8aa890..b9a05fda03e4 100644 --- a/drivers/input/misc/twl4030-pwrbutton.c +++ b/drivers/input/misc/twl4030-pwrbutton.c | |||
@@ -114,18 +114,8 @@ static struct platform_driver twl4030_pwrbutton_driver = { | |||
114 | }, | 114 | }, |
115 | }; | 115 | }; |
116 | 116 | ||
117 | static int __init twl4030_pwrbutton_init(void) | 117 | module_platform_driver_probe(twl4030_pwrbutton_driver, |
118 | { | ||
119 | return platform_driver_probe(&twl4030_pwrbutton_driver, | ||
120 | twl4030_pwrbutton_probe); | 118 | twl4030_pwrbutton_probe); |
121 | } | ||
122 | module_init(twl4030_pwrbutton_init); | ||
123 | |||
124 | static void __exit twl4030_pwrbutton_exit(void) | ||
125 | { | ||
126 | platform_driver_unregister(&twl4030_pwrbutton_driver); | ||
127 | } | ||
128 | module_exit(twl4030_pwrbutton_exit); | ||
129 | 119 | ||
130 | MODULE_ALIAS("platform:twl4030_pwrbutton"); | 120 | MODULE_ALIAS("platform:twl4030_pwrbutton"); |
131 | MODULE_DESCRIPTION("Triton2 Power Button"); | 121 | MODULE_DESCRIPTION("Triton2 Power Button"); |