From patchwork Tue May 31 10:56:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 9144317 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C5DCF60761 for ; Tue, 31 May 2016 10:58:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9C0027B89 for ; Tue, 31 May 2016 10:58:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEAC728188; Tue, 31 May 2016 10:58:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63CB527B89 for ; Tue, 31 May 2016 10:58:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752408AbcEaK6B (ORCPT ); Tue, 31 May 2016 06:58:01 -0400 Received: from sauhun.de ([89.238.76.85]:42008 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752252AbcEaK6A (ORCPT ); Tue, 31 May 2016 06:58:00 -0400 Received: from dslb-188-103-104-142.188.103.pools.vodafone-ip.de ([188.103.104.142]:57480 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1b7hN0-0002Le-VV; Tue, 31 May 2016 12:57:59 +0200 From: Wolfram Sang To: driverdev-devel@linuxdriverproject.org Cc: Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: [PATCH V2 29/31] staging: ks7010: simplify module_init/exit Date: Tue, 31 May 2016 12:56:41 +0200 Message-Id: <1464692203-4180-30-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1464692203-4180-1-git-send-email-wsa@the-dreams.de> References: <1464692203-4180-1-git-send-email-wsa@the-dreams.de> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wolfram Sang The printouts are not needed, the driver core has enough debug output for this if wanted. So, use a helper to save boilerplate code. Signed-off-by: Wolfram Sang --- drivers/staging/ks7010/ks7010_sdio.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 8c0d1bb58dcd9c..a8a14f928d421b 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -1237,30 +1237,7 @@ static void ks7910_sdio_remove(struct sdio_func *func) return; } -static int __init ks7010_sdio_init(void) -{ - int status; - - /* register with bus driver core */ - status = sdio_register_driver(&ks7010_sdio_driver); - if (status != 0) { - DPRINTK(1, - "ks79xx_sdio : failed to register with bus driver, %d\n", - status); - } - return status; -} - -static void __exit ks7010_sdio_exit(void) -{ - DPRINTK(5, " \n"); - sdio_unregister_driver(&ks7010_sdio_driver); - return; -} - -module_init(ks7010_sdio_init); -module_exit(ks7010_sdio_exit); - +module_driver(ks7010_sdio_driver, sdio_register_driver, sdio_unregister_driver); MODULE_AUTHOR("Sang Engineering, Qi-Hardware, KeyStream"); MODULE_DESCRIPTION("Driver for KeyStream KS7010 based SDIO cards"); MODULE_LICENSE("GPL v2");