Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752507Ab3JUCz7 (ORCPT ); Sun, 20 Oct 2013 22:55:59 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:40805 "EHLO mail-bk0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752406Ab3JUCz5 (ORCPT ); Sun, 20 Oct 2013 22:55:57 -0400 MIME-Version: 1.0 Date: Mon, 21 Oct 2013 10:55:56 +0800 Message-ID: Subject: [PATCH -next] pinctrl: tb10x: use module_platform_driver to simplify the code From: Wei Yongjun To: linus.walleij@linaro.org, grant.likely@linaro.org, rob.herring@calxeda.com Cc: yongjun_wei@trendmicro.com.cn, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1237 Lines: 39 From: Wei Yongjun module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun --- 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 "); MODULE_LICENSE("GPL"); -module_init(tb10x_iopinctrl_init); -module_exit(tb10x_iopinctrl_exit); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/