From 85aa391528ad11bfdfa5e5dec1f3e91cfe8ab078 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Wed, 30 Oct 2013 11:08:55 +0800 Subject: gpio: tb10x: use module_platform_driver to simplify the code module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun Signed-off-by: Linus Walleij --- drivers/gpio/gpio-tb10x.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/gpio') diff --git a/drivers/gpio/gpio-tb10x.c b/drivers/gpio/gpio-tb10x.c index 833d0f40d40e..af4975c20d85 100644 --- a/drivers/gpio/gpio-tb10x.c +++ b/drivers/gpio/gpio-tb10x.c @@ -324,18 +324,7 @@ static struct platform_driver tb10x_gpio_driver = { } }; -static int __init ab_gpio_init(void) -{ - return platform_driver_register(&tb10x_gpio_driver); -} - -static void __exit ab_gpio_exit(void) -{ - platform_driver_unregister(&tb10x_gpio_driver); -} - -module_init(ab_gpio_init); -module_exit(ab_gpio_exit); +module_platform_driver(tb10x_gpio_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("tb10x gpio."); MODULE_VERSION("0.0.1"); -- cgit v1.2.3