aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/amimouse.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-01-10 18:08:01 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-01-11 02:12:46 -0500
commitd3d25808df236f27ba34125e7cf90de98fbf346c (patch)
tree41101bbce35363c62749f547b32001842589800d /drivers/input/mouse/amimouse.c
parentda733563be5a9da26fe81d9f007262d00b846e22 (diff)
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/mouse/amimouse.c')
-rw-r--r--drivers/input/mouse/amimouse.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/input/mouse/amimouse.c b/drivers/input/mouse/amimouse.c
index 39be7b82c046..ff5f61a0fd3a 100644
--- a/drivers/input/mouse/amimouse.c
+++ b/drivers/input/mouse/amimouse.c
@@ -140,13 +140,25 @@ static int __exit amimouse_remove(struct platform_device *pdev)
140} 140}
141 141
142static struct platform_driver amimouse_driver = { 142static struct platform_driver amimouse_driver = {
143 .probe = amimouse_probe,
144 .remove = __exit_p(amimouse_remove), 143 .remove = __exit_p(amimouse_remove),
145 .driver = { 144 .driver = {
146 .name = "amiga-mouse", 145 .name = "amiga-mouse",
147 .owner = THIS_MODULE, 146 .owner = THIS_MODULE,
148 }, 147 },
149}; 148};
150module_platform_driver(amimouse_driver); 149
150static int __init amimouse_init(void)
151{
152 return platform_driver_probe(&amimouse_driver, amimouse_probe);
153}
154
155module_init(amimouse_init);
156
157static void __exit amimouse_exit(void)
158{
159 platform_driver_unregister(&amimouse_driver);
160}
161
162module_exit(amimouse_exit);
151 163
152MODULE_ALIAS("platform:amiga-mouse"); 164MODULE_ALIAS("platform:amiga-mouse");