Messages in this thread Patch in this message | | | Date | Mon, 21 Oct 2013 10:55:56 +0800 | Subject | [PATCH -next] pinctrl: tb10x: use module_platform_driver to simplify the code | From | Wei Yongjun <> |
| |
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
module_platform_driver() makes the code simpler by eliminating boilerplate code.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> --- drivers/pinctrl/pinctrl-tb10x.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-tb10x.c b/drivers/pinctrl/pinctrl-tb10x.c index 2e1ea56..abf55c9 100644 --- a/drivers/pinctrl/pinctrl-tb10x.c +++ b/drivers/pinctrl/pinctrl-tb10x.c @@ -870,17 +870,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 <christian.ruppert@abilis.com>"); MODULE_LICENSE("GPL"); -module_init(tb10x_iopinctrl_init); -module_exit(tb10x_iopinctrl_exit);
| |