summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/twl4030-pwrbutton.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-01-10 15:08:01 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-01-10 23:12:46 -0800
commitd3d25808df236f27ba34125e7cf90de98fbf346c (patch)
tree41101bbce35363c62749f547b32001842589800d /drivers/input/misc/twl4030-pwrbutton.c
parentda733563be5a9da26fe81d9f007262d00b846e22 (diff)
downloadop-kernel-dev-d3d25808df236f27ba34125e7cf90de98fbf346c.zip
op-kernel-dev-d3d25808df236f27ba34125e7cf90de98fbf346c.tar.gz
Input: revert some over-zealous conversions to module_platform_driver()
Recent conversion to module_platform_driver() went a bit too far and converted not only drivers that used platform_driver_register() but also ones using platform_driver_probe(), breaking them in process. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/misc/twl4030-pwrbutton.c')
-rw-r--r--drivers/input/misc/twl4030-pwrbutton.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
index 19a6882..38e4b50 100644
--- a/drivers/input/misc/twl4030-pwrbutton.c
+++ b/drivers/input/misc/twl4030-pwrbutton.c
@@ -107,14 +107,25 @@ static int __exit twl4030_pwrbutton_remove(struct platform_device *pdev)
}
static struct platform_driver twl4030_pwrbutton_driver = {
- .probe = twl4030_pwrbutton_probe,
.remove = __exit_p(twl4030_pwrbutton_remove),
.driver = {
.name = "twl4030_pwrbutton",
.owner = THIS_MODULE,
},
};
-module_platform_driver(twl4030_pwrbutton_driver);
+
+static int __init twl4030_pwrbutton_init(void)
+{
+ return 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");
OpenPOWER on IntegriCloud