From: Wei Yongjun Date: Wed, 23 Oct 2013 08:46:00 +0000 (+0200) Subject: pinctrl: tb10x: use module_platform_driver to simplify the code X-Git-Tag: firefly_0821_release~176^2~5008^2~13 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7ddd183738fc39cbe3fbfa1954082d4189f14a5c;p=firefly-linux-kernel-4.4.55.git pinctrl: 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 --- diff --git a/drivers/pinctrl/pinctrl-tb10x.c b/drivers/pinctrl/pinctrl-tb10x.c index 9f7fa9b6ea80..c5e0f6973a3b 100644 --- a/drivers/pinctrl/pinctrl-tb10x.c +++ b/drivers/pinctrl/pinctrl-tb10x.c @@ -869,17 +869,7 @@ static struct platform_driver tb10x_pinctrl_pdrv = { } }; -static int __init tb10x_iopinctrl_init(void) -{ - return platform_driver_register(&tb10x_pinctrl_pdrv); -} - -static void __exit tb10x_iopinctrl_exit(void) -{ - platform_driver_unregister(&tb10x_pinctrl_pdrv); -} +module_platform_driver(tb10x_pinctrl_pdrv); MODULE_AUTHOR("Christian Ruppert "); MODULE_LICENSE("GPL"); -module_init(tb10x_iopinctrl_init); -module_exit(tb10x_iopinctrl_exit);