aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-tb10x.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-10-29 23:08:55 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-10-30 14:26:17 -0400
commit85aa391528ad11bfdfa5e5dec1f3e91cfe8ab078 (patch)
treeafd52192c127593306f1dc41c3f82ab49f584242 /drivers/gpio/gpio-tb10x.c
parente16dbf6011137343f51685c1e0c5be36a68fc501 (diff)
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 <yongjun_wei@trendmicro.com.cn> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-tb10x.c')
-rw-r--r--drivers/gpio/gpio-tb10x.c13
1 files changed, 1 insertions, 12 deletions
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 = {
324 } 324 }
325}; 325};
326 326
327static int __init ab_gpio_init(void) 327module_platform_driver(tb10x_gpio_driver);
328{
329 return platform_driver_register(&tb10x_gpio_driver);
330}
331
332static void __exit ab_gpio_exit(void)
333{
334 platform_driver_unregister(&tb10x_gpio_driver);
335}
336
337module_init(ab_gpio_init);
338module_exit(ab_gpio_exit);
339MODULE_LICENSE("GPL"); 328MODULE_LICENSE("GPL");
340MODULE_DESCRIPTION("tb10x gpio."); 329MODULE_DESCRIPTION("tb10x gpio.");
341MODULE_VERSION("0.0.1"); 330MODULE_VERSION("0.0.1");