Input: amimouse - use module_platform_driver_probe macro
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 18 Mar 2013 04:28:00 +0000 (21:28 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 18 Mar 2013 04:37:25 +0000 (21:37 -0700)
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>
drivers/input/mouse/amimouse.c

index 5fa9934..b55d5af 100644 (file)
@@ -146,18 +146,6 @@ static struct 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_platform_driver_probe(amimouse_driver, amimouse_probe);
 
 MODULE_ALIAS("platform:amiga-mouse");