From: Li Zetao Date: Mon, 21 Aug 2023 14:03:45 +0000 (+0800) Subject: wifi: wlcore: sdio: Use module_sdio_driver macro to simplify the code X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=98fdd77d3df7ba269941f9a262d82a31537cf013;p=linux.git wifi: wlcore: sdio: Use module_sdio_driver macro to simplify the code 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 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230821140345.3140493-1-lizetao1@huawei.com --- diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c index cf8d909fa8261..f0686635db46e 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.");