summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevendra Naga <develkernel412222@gmail.com>2012-07-20 22:45:48 +0545
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-13 19:04:25 -0700
commitc21be47c834bc411339ee04462ec7c5246e58596 (patch)
tree97ec08971e8c435461e72d7415a7f44714e332e8
parent3d4e9e57e6da4ccd4c9710c76651175bc756799e (diff)
downloadlwn-c21be47c834bc411339ee04462ec7c5246e58596.tar.gz
lwn-c21be47c834bc411339ee04462ec7c5246e58596.zip
staging/android: use module_platform_driver
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>
-rw-r--r--drivers/staging/android/timed_gpio.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c
index 45c522cbe784..e81451425c01 100644
--- a/drivers/staging/android/timed_gpio.c
+++ b/drivers/staging/android/timed_gpio.c
@@ -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");