Commit c21be47c834bc411339ee04462ec7c5246e58596

Authored by Devendra Naga
Committed by Greg Kroah-Hartman
1 parent 3d4e9e57e6

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>

Showing 1 changed file with 1 additions and 12 deletions Side-by-side Diff

drivers/staging/android/timed_gpio.c
... ... @@ -161,18 +161,7 @@
161 161 },
162 162 };
163 163  
164   -static int __init timed_gpio_init(void)
165   -{
166   - return platform_driver_register(&timed_gpio_driver);
167   -}
168   -
169   -static void __exit timed_gpio_exit(void)
170   -{
171   - platform_driver_unregister(&timed_gpio_driver);
172   -}
173   -
174   -module_init(timed_gpio_init);
175   -module_exit(timed_gpio_exit);
  164 +module_platform_driver(timed_gpio_driver);
176 165  
177 166 MODULE_AUTHOR("Mike Lockwood <lockwood@android.com>");
178 167 MODULE_DESCRIPTION("timed gpio driver");