From d3d25808df236f27ba34125e7cf90de98fbf346c Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Tue, 10 Jan 2012 15:08:01 -0800 Subject: 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 Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/amimouse.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'drivers/input/mouse') diff --git a/drivers/input/mouse/amimouse.c b/drivers/input/mouse/amimouse.c index 39be7b82c04..ff5f61a0fd3 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"); -- cgit v1.2.3-70-g09d2