diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-10 15:08:01 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-10 23:12:46 -0800 |
commit | d3d25808df236f27ba34125e7cf90de98fbf346c (patch) | |
tree | 41101bbce35363c62749f547b32001842589800d /drivers/input/mouse | |
parent | da733563be5a9da26fe81d9f007262d00b846e22 (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')
-rw-r--r-- | drivers/input/mouse/amimouse.c | 16 |
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) } static struct platform_driver amimouse_driver = { - .probe = amimouse_probe, .remove = __exit_p(amimouse_remove), .driver = { .name = "amiga-mouse", .owner = THIS_MODULE, }, }; -module_platform_driver(amimouse_driver); + +static int __init amimouse_init(void) +{ + return platform_driver_probe(&amimouse_driver, amimouse_probe); +} + +module_init(amimouse_init); + +static void __exit amimouse_exit(void) +{ + platform_driver_unregister(&amimouse_driver); +} + +module_exit(amimouse_exit); MODULE_ALIAS("platform:amiga-mouse"); |