]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
Input: atmel-wm97xx - use module_platform_driver_probe macro
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 18 Mar 2013 04:29:07 +0000 (21:29 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 18 Mar 2013 04:37:35 +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/touchscreen/atmel-wm97xx.c

index c5c2dbb938692f418ba603e649b7fc062462268a..2c1e46b7e45bfa73120796af2898855240f5b6cc 100644 (file)
@@ -432,17 +432,7 @@ static struct platform_driver atmel_wm97xx_driver = {
        },
 };
 
-static int __init atmel_wm97xx_init(void)
-{
-       return platform_driver_probe(&atmel_wm97xx_driver, atmel_wm97xx_probe);
-}
-module_init(atmel_wm97xx_init);
-
-static void __exit atmel_wm97xx_exit(void)
-{
-       platform_driver_unregister(&atmel_wm97xx_driver);
-}
-module_exit(atmel_wm97xx_exit);
+module_platform_driver_probe(atmel_wm97xx_driver, atmel_wm97xx_probe);
 
 MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
 MODULE_DESCRIPTION("wm97xx continuous touch driver for Atmel AT91 and AVR32");