From patchwork Wed Mar 13 21:01:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Wang X-Patchwork-Id: 10851743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1029713B5 for ; Wed, 13 Mar 2019 21:02:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F037B28ADA for ; Wed, 13 Mar 2019 21:02:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3DB729F99; Wed, 13 Mar 2019 21:02:29 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY 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 68DED28ADA for ; Wed, 13 Mar 2019 21:02:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727451AbfCMVCO (ORCPT ); Wed, 13 Mar 2019 17:02:14 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:22703 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727053AbfCMVCL (ORCPT ); Wed, 13 Mar 2019 17:02:11 -0400 X-UUID: df365853464e4ac583d7f624e544b023-20190314 X-UUID: df365853464e4ac583d7f624e544b023-20190314 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1420528183; Thu, 14 Mar 2019 05:02:05 +0800 Received: from MTKMBS01DR.mediatek.inc (172.21.101.111) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 14 Mar 2019 05:02:03 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01dr.mediatek.inc (172.21.101.111) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 14 Mar 2019 05:02:03 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 14 Mar 2019 05:02:02 +0800 From: To: , , CC: , , , , Sean Wang Subject: [PATCH v1 2/3] Bluetooth: mediatek: Use module_sdio_driver helper Date: Thu, 14 Mar 2019 05:01:59 +0800 Message-ID: <97430233d791cf69398e6a5f568a61ad42077249.1552510141.git.sean.wang@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-MTK: N X-TM-SNTS-SMTP: F6112C37EDFCC92A8D27299F254CEB6AC4F3E204492C4CE66884824D96311BD32000:8 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Wang Macro module_sdio_driver is used for drivers whose init and exit paths only register and unregister to SDIO API. So remove boilerplate code to make code simpler by using module_sdio_driver. Cc: Ulf Hansson Suggested-by: Marcel Holtmann Signed-off-by: Sean Wang --- drivers/bluetooth/btmtksdio.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c index 23cf63888bac..ca7f28f439da 100644 --- a/drivers/bluetooth/btmtksdio.c +++ b/drivers/bluetooth/btmtksdio.c @@ -956,20 +956,7 @@ static struct sdio_driver btmtksdio_driver = { .id_table = btmtksdio_table, }; -static int __init btmtksdio_init(void) -{ - BT_INFO("MediaTek Bluetooth SDIO driver ver %s", VERSION); - - return sdio_register_driver(&btmtksdio_driver); -} - -static void __exit btmtksdio_exit(void) -{ - sdio_unregister_driver(&btmtksdio_driver); -} - -module_init(btmtksdio_init); -module_exit(btmtksdio_exit); +module_sdio_driver(btmtksdio_driver); MODULE_AUTHOR("Sean Wang "); MODULE_DESCRIPTION("MediaTek Bluetooth SDIO driver ver " VERSION);