diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2024-03-29 18:10:17 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2024-04-05 10:59:38 +0200 |
commit | 718fcb7d7b3f9769b2cc35e90a97929047ae31b4 (patch) | |
tree | da80c1e221f844056f5d4f8d51d298200c5997bb /drivers/net/wireless/ti | |
parent | wifi: rsi: sdio: simplify module initialization (diff) | |
download | linux-718fcb7d7b3f9769b2cc35e90a97929047ae31b4.tar.xz linux-718fcb7d7b3f9769b2cc35e90a97929047ae31b4.zip |
wifi: wl1251: simplify module initialization
This driver's initialization functions do not perform any custom code,
except printing messages. Printing messages on modules
loading/unloading is discouraged because it pollutes the dmesg
regardless whether user actually has this device. Core kernel code
already gives tools to investigate whether module was loaded or not.
Drop the printing messages which allows to replace open-coded
module_sdio_driver().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240329171019.63836-4-krzysztof.kozlowski@linaro.org
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r-- | drivers/net/wireless/ti/wl1251/sdio.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c index 4e5b351f80f0..c705081249d6 100644 --- a/drivers/net/wireless/ti/wl1251/sdio.c +++ b/drivers/net/wireless/ti/wl1251/sdio.c @@ -323,25 +323,7 @@ static struct sdio_driver wl1251_sdio_driver = { .remove = wl1251_sdio_remove, .drv.pm = &wl1251_sdio_pm_ops, }; - -static int __init wl1251_sdio_init(void) -{ - int err; - - err = sdio_register_driver(&wl1251_sdio_driver); - if (err) - wl1251_error("failed to register sdio driver: %d", err); - return err; -} - -static void __exit wl1251_sdio_exit(void) -{ - sdio_unregister_driver(&wl1251_sdio_driver); - wl1251_notice("unloaded"); -} - -module_init(wl1251_sdio_init); -module_exit(wl1251_sdio_exit); +module_sdio_driver(wl1251_sdio_driver); MODULE_DESCRIPTION("TI WL1251 SDIO helpers"); MODULE_LICENSE("GPL"); |