Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Devendra Naga and committed by
Greg Kroah-Hartman
c21be47c 3d4e9e57

+1 -12
+1 -12
drivers/staging/android/timed_gpio.c
··· 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");