diff mbox series

[-next,v2] wifi: wlcore: sdio: Use module_sdio_driver macro to simplify the code

Message ID 20230821140345.3140493-1-lizetao1@huawei.com
State New
Headers show
Series [-next,v2] wifi: wlcore: sdio: Use module_sdio_driver macro to simplify the code | expand

Commit Message

Li Zetao Aug. 21, 2023, 2:03 p.m. UTC
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(-)

Comments

Kalle Valo Aug. 25, 2023, 9:59 a.m. UTC | #1
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
diff mbox series

Patch

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.");