]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging/android: use module_platform_driver
authorDevendra Naga <develkernel412222@gmail.com>
Fri, 20 Jul 2012 17:00:48 +0000 (22:45 +0545)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Aug 2012 02:04:25 +0000 (19:04 -0700)
as the init and exit functions just do a platform_driver_register and
platform_driver_unregister, and nothing else, so its better to
use the module_platform_driver macro rather replicating its implementation

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/timed_gpio.c

index 45c522cbe78446e0b0eb5e72fbf14e4a26f1d8b1..e81451425c012c42b7e032cfeb5455a17b6535b0 100644 (file)
@@ -161,18 +161,7 @@ static struct platform_driver timed_gpio_driver = {
        },
 };
 
-static int __init timed_gpio_init(void)
-{
-       return platform_driver_register(&timed_gpio_driver);
-}
-
-static void __exit timed_gpio_exit(void)
-{
-       platform_driver_unregister(&timed_gpio_driver);
-}
-
-module_init(timed_gpio_init);
-module_exit(timed_gpio_exit);
+module_platform_driver(timed_gpio_driver);
 
 MODULE_AUTHOR("Mike Lockwood <lockwood@android.com>");
 MODULE_DESCRIPTION("timed gpio driver");