Input: davinci_keyscan - use module_platform_driver_probe macro
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 18 Mar 2013 04:26:22 +0000 (21:26 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 18 Mar 2013 04:37:09 +0000 (21:37 -0700)
module_platform_driver_probe() simplifies the code by eliminating
boilerplate code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/davinci_keyscan.c

index 4e4e453ea15ec0f3cb51ca2e9eabda68ac698fee..829753702b629dba6ae8081d3b6d409846e80919 100644 (file)
@@ -329,17 +329,7 @@ static struct platform_driver davinci_ks_driver = {
        .remove = davinci_ks_remove,
 };
 
-static int __init davinci_ks_init(void)
-{
-       return platform_driver_probe(&davinci_ks_driver, davinci_ks_probe);
-}
-module_init(davinci_ks_init);
-
-static void __exit davinci_ks_exit(void)
-{
-       platform_driver_unregister(&davinci_ks_driver);
-}
-module_exit(davinci_ks_exit);
+module_platform_driver_probe(davinci_ks_driver, davinci_ks_probe);
 
 MODULE_AUTHOR("Miguel Aguilar");
 MODULE_DESCRIPTION("Texas Instruments DaVinci Key Scan Driver");