From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-wireless-owner@vger.kernel.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
	aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
	by smtp.lore.kernel.org (Postfix) with ESMTP id C229FC0015E
	for <linux-wireless@archiver.kernel.org>; Tue, 15 Aug 2023 07:55:37 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
        id S235464AbjHOHzE (ORCPT
        <rfc822;linux-wireless@archiver.kernel.org>);
        Tue, 15 Aug 2023 03:55:04 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54894 "EHLO
        lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
        with ESMTP id S235457AbjHOHyl (ORCPT
        <rfc822;linux-wireless@vger.kernel.org>);
        Tue, 15 Aug 2023 03:54:41 -0400
Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189])
        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B6FADD
        for <linux-wireless@vger.kernel.org>; Tue, 15 Aug 2023 00:54:39 -0700 (PDT)
Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.55])
        by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4RQ3PT0L8KzFqdC;
        Tue, 15 Aug 2023 15:51:41 +0800 (CST)
Received: from huawei.com (10.90.53.73) by kwepemi500012.china.huawei.com
 (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 15 Aug
 2023 15:54:37 +0800
From:   Li Zetao <lizetao1@huawei.com>
To:     <kvalo@kernel.org>
CC:     <lizetao1@huawei.com>, <linux-wireless@vger.kernel.org>
Subject: [PATCH net-next] wlcore: sdio: Use module_sdio_driver macro to simplify the code
Date:   Tue, 15 Aug 2023 15:54:19 +0800
Message-ID: <20230815075419.1067635-1-lizetao1@huawei.com>
X-Mailer: git-send-email 2.34.1
MIME-Version: 1.0
Content-Transfer-Encoding: 7BIT
Content-Type:   text/plain; charset=US-ASCII
X-Originating-IP: [10.90.53.73]
X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To
 kwepemi500012.china.huawei.com (7.221.188.12)
X-CFilter-Loop: Reflected
Precedence: bulk
List-ID: <linux-wireless.vger.kernel.org>
X-Mailing-List: linux-wireless@vger.kernel.org

Use the module_sdio_driver macro to simplify the code, which is the
same as declaring with module_init() and module_exit().

Signed-off-by: Li Zetao <lizetao1@huawei.com>
---
 drivers/net/wireless/ti/wlcore/sdio.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
index cf8d909fa826..f0686635db46 100644
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -442,18 +442,7 @@ static struct sdio_driver wl1271_sdio_driver = {
 #endif
 };
 
-static int __init wl1271_init(void)
-{
-	return sdio_register_driver(&wl1271_sdio_driver);
-}
-
-static void __exit wl1271_exit(void)
-{
-	sdio_unregister_driver(&wl1271_sdio_driver);
-}
-
-module_init(wl1271_init);
-module_exit(wl1271_exit);
+module_sdio_driver(wl1271_sdio_driver);
 
 module_param(dump, bool, 0600);
 MODULE_PARM_DESC(dump, "Enable sdio read/write dumps.");
-- 
2.34.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-wireless-owner@vger.kernel.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
	aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
	by smtp.lore.kernel.org (Postfix) with ESMTP id 7E66DEE49A6
	for <linux-wireless@archiver.kernel.org>; Mon, 21 Aug 2023 12:53:44 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
        id S235097AbjHUMxo (ORCPT
        <rfc822;linux-wireless@archiver.kernel.org>);
        Mon, 21 Aug 2023 08:53:44 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59262 "EHLO
        lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
        with ESMTP id S234004AbjHUMxo (ORCPT
        <rfc822;linux-wireless@vger.kernel.org>);
        Mon, 21 Aug 2023 08:53:44 -0400
Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217])
        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9839CD
        for <linux-wireless@vger.kernel.org>; Mon, 21 Aug 2023 05:53:42 -0700 (PDT)
Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140])
        (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
         key-exchange X25519 server-signature RSA-PSS (2048 bits))
        (No client certificate requested)
        by dfw.source.kernel.org (Postfix) with ESMTPS id 8911F63541
        for <linux-wireless@vger.kernel.org>; Mon, 21 Aug 2023 12:53:42 +0000 (UTC)
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F6ADC433C9;
        Mon, 21 Aug 2023 12:53:41 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
        s=k20201202; t=1692622422;
        bh=/KCUIxClIx4e8DVZGuBHK0dBzP46U1dOA/9DEWLxrgA=;
        h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
        b=a0zW1BcvvdGHw4OOAJY0dXe/9Oeo9m/ZImZHrekxBNozKGE4VqC9gxuW6wdWyL6Ey
         caMp82EKuOsmffaXjRug2+YgHLMcqg577LIgvMTTZ4GQJvhMOyePhk4druXc+NNpLm
         Y8sa+chPG36KQBSqpXvx2nItWM2NIMWHpnZ1M/oi+MRz7iBulK+Xm/hBQmbL9B5gZW
         iHvY5w/1ShOonjhcwcMNaIZa2zAfGfLpD/nd46guc335tb/gQPMGs8/8kWQc5mkDUh
         +PS0uD6qCuSeNHkMAoUZOSQKiLPEa0tkb7yq8pNsww4lrPVE4mL0AD+IWApluzdBAg
         EJPgIlBXAG6NQ==
From:   Kalle Valo <kvalo@kernel.org>
To:     Li Zetao <lizetao1@huawei.com>
Cc:     <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH net-next] wlcore: sdio: Use module_sdio_driver macro to
 simplify the code
References: <20230815075419.1067635-1-lizetao1@huawei.com>
Date:   Mon, 21 Aug 2023 15:53:39 +0300
In-Reply-To: <20230815075419.1067635-1-lizetao1@huawei.com> (Li Zetao's
        message of "Tue, 15 Aug 2023 15:54:19 +0800")
Message-ID: <87350ck14c.fsf@kernel.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
Precedence: bulk
List-ID: <linux-wireless.vger.kernel.org>
X-Mailing-List: linux-wireless@vger.kernel.org

Li Zetao <lizetao1@huawei.com> writes:

> Use the module_sdio_driver macro to simplify the code, which is the
> same as declaring with module_init() and module_exit().
>
> Signed-off-by: Li Zetao <lizetao1@huawei.com>

wlcore patches go to wireless-next, not net-next.

"wifi:" missing from subject but I can add that.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-wireless-owner@vger.kernel.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
	aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
	by smtp.lore.kernel.org (Postfix) with ESMTP id B22DBEE4993
	for <linux-wireless@archiver.kernel.org>; Mon, 21 Aug 2023 14:04:07 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
        id S235655AbjHUOEH (ORCPT
        <rfc822;linux-wireless@archiver.kernel.org>);
        Mon, 21 Aug 2023 10:04:07 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59098 "EHLO
        lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
        with ESMTP id S235650AbjHUOEF (ORCPT
        <rfc822;linux-wireless@vger.kernel.org>);
        Mon, 21 Aug 2023 10:04:05 -0400
Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])
        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9CBFF4
        for <linux-wireless@vger.kernel.org>; Mon, 21 Aug 2023 07:04:02 -0700 (PDT)
Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.56])
        by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RTvLc23dkzrSdq;
        Mon, 21 Aug 2023 22:02:32 +0800 (CST)
Received: from huawei.com (10.90.53.73) by kwepemi500012.china.huawei.com
 (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Mon, 21 Aug
 2023 22:03:59 +0800
From:   Li Zetao <lizetao1@huawei.com>
To:     <kvalo@kernel.org>
CC:     <linux-wireless@vger.kernel.org>, <lizetao1@huawei.com>
Subject: [PATCH -next v2] wifi: wlcore: sdio: Use module_sdio_driver macro to simplify the code
Date:   Mon, 21 Aug 2023 22:03:45 +0800
Message-ID: <20230821140345.3140493-1-lizetao1@huawei.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <87350ck14c.fsf@kernel.org>
References: <87350ck14c.fsf@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 7BIT
Content-Type:   text/plain; charset=US-ASCII
X-Originating-IP: [10.90.53.73]
X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To
 kwepemi500012.china.huawei.com (7.221.188.12)
X-CFilter-Loop: Reflected
Precedence: bulk
List-ID: <linux-wireless.vger.kernel.org>
X-Mailing-List: linux-wireless@vger.kernel.org

Use the module_sdio_driver macro to simplify the code, which is the
same as declaring with module_init() and module_exit().

Signed-off-by: Li Zetao <lizetao1@huawei.com>
---
v1 -> v2: Add "wifi:" to the subject.
v1: https://lore.kernel.org/all/20230815075419.1067635-1-lizetao1@huawei.com/

 drivers/net/wireless/ti/wlcore/sdio.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
index cf8d909fa826..f0686635db46 100644
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -442,18 +442,7 @@ static struct sdio_driver wl1271_sdio_driver = {
 #endif
 };
 
-static int __init wl1271_init(void)
-{
-	return sdio_register_driver(&wl1271_sdio_driver);
-}
-
-static void __exit wl1271_exit(void)
-{
-	sdio_unregister_driver(&wl1271_sdio_driver);
-}
-
-module_init(wl1271_init);
-module_exit(wl1271_exit);
+module_sdio_driver(wl1271_sdio_driver);
 
 module_param(dump, bool, 0600);
 MODULE_PARM_DESC(dump, "Enable sdio read/write dumps.");
-- 
2.34.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-wireless-owner@vger.kernel.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
	aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
	by smtp.lore.kernel.org (Postfix) with ESMTP id 708F8C3DA66
	for <linux-wireless@archiver.kernel.org>; Fri, 25 Aug 2023 10:00:38 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
        id S235997AbjHYKAI (ORCPT
        <rfc822;linux-wireless@archiver.kernel.org>);
        Fri, 25 Aug 2023 06:00:08 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40374 "EHLO
        lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
        with ESMTP id S241085AbjHYJ7n (ORCPT
        <rfc822;linux-wireless@vger.kernel.org>);
        Fri, 25 Aug 2023 05:59:43 -0400
Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217])
        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A93D1FD3
        for <linux-wireless@vger.kernel.org>; Fri, 25 Aug 2023 02:59:41 -0700 (PDT)
Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140])
        (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
         key-exchange X25519 server-signature RSA-PSS (2048 bits))
        (No client certificate requested)
        by dfw.source.kernel.org (Postfix) with ESMTPS id 07F1166578
        for <linux-wireless@vger.kernel.org>; Fri, 25 Aug 2023 09:59:41 +0000 (UTC)
Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB949C433C7;
        Fri, 25 Aug 2023 09:59:39 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
        s=k20201202; t=1692957580;
        bh=TYwo3sgXuBSf+cmKIDsJieDFELuO3vPZIXjiS6bhSZI=;
        h=Subject:From:In-Reply-To:References:To:Cc:Date:From;
        b=lHShTL1LU6Dj2wsh8iQYIQZscSqqGyv5JkgAGNS8YVHEhahNNU9YflMrQPLPs1i9Q
         K/3cIjkJ0BVE3E0opGHsto3WgpO0szl7Qgo4EviC9Y58DFMRgUHM3DLg7T53t8fGai
         hyIIOdFOHHnOrkB5zZYW3PA5XPz2kb7ZjJtSm5JK0NdtTjBRMcUKu457rKhbfcqT+r
         uT9YEHnKvFGOc6NxoCKmlXDvJnXRBIrEP7ZSco+/GI6STqaIOb3VTTVU/JMC95+p20
         U21jZF5DEa0ZRqczDhqyEh8p7mphC+qyY+c37XPhy3Okd6JgFB4ypXlmsO5YCmiKdR
         ER/24t/COkVGA==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Re: [PATCH -next v2] wifi: wlcore: sdio: Use module_sdio_driver macro
 to
 simplify the code
From:   Kalle Valo <kvalo@kernel.org>
In-Reply-To: <20230821140345.3140493-1-lizetao1@huawei.com>
References: <20230821140345.3140493-1-lizetao1@huawei.com>
To:     Li Zetao <lizetao1@huawei.com>
Cc:     <linux-wireless@vger.kernel.org>, <lizetao1@huawei.com>
User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2
Message-ID: <169295757783.1850672.14583683646953333445.kvalo@kernel.org>
Date:   Fri, 25 Aug 2023 09:59:39 +0000 (UTC)
Precedence: bulk
List-ID: <linux-wireless.vger.kernel.org>
X-Mailing-List: linux-wireless@vger.kernel.org

Li Zetao <lizetao1@huawei.com> wrote:

> Use the module_sdio_driver macro to simplify the code, which is the
> same as declaring with module_init() and module_exit().
> 
> Signed-off-by: Li Zetao <lizetao1@huawei.com>

Patch applied to wireless-next.git, thanks.

98fdd77d3df7 wifi: wlcore: sdio: Use module_sdio_driver macro to simplify the code

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20230821140345.3140493-1-lizetao1@huawei.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


