diff mbox series

[3/6] wifi: rsi: sdio: simplify module initialization

Message ID 20240329171019.63836-3-krzysztof.kozlowski@linaro.org (mailing list archive)
State Accepted
Commit 73ec84df346938cc28485d98d7ca8ba1869d2c5e
Delegated to: Kalle Valo
Headers show
Series [1/6] wifi: ath10k: sdio: simplify module initialization | expand

Commit Message

Krzysztof Kozlowski March 29, 2024, 5:10 p.m. UTC
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>
---
 drivers/net/wireless/rsi/rsi_91x_sdio.c | 31 +------------------------
 1 file changed, 1 insertion(+), 30 deletions(-)

Comments

Kalle Valo April 5, 2024, 9 a.m. UTC | #1
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> 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>

4 patches applied to wireless-next.git, thanks.

73ec84df3469 wifi: rsi: sdio: simplify module initialization
718fcb7d7b3f wifi: wl1251: simplify module initialization
c33c93e9e96a wifi: wilc1000: replace open-coded module_sdio_driver()
170861bc0044 wifi: mwifiex: replace open-coded module_sdio_driver()
diff mbox series

Patch

diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
index 8e7b757475d2..1e578533e473 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -1519,36 +1519,7 @@  static struct sdio_driver rsi_driver = {
 	}
 #endif
 };
-
-/**
- * rsi_module_init() - This function registers the sdio module.
- * @void: Void.
- *
- * Return: 0 on success.
- */
-static int rsi_module_init(void)
-{
-	int ret;
-
-	ret = sdio_register_driver(&rsi_driver);
-	rsi_dbg(INIT_ZONE, "%s: Registering driver\n", __func__);
-	return ret;
-}
-
-/**
- * rsi_module_exit() - This function unregisters the sdio module.
- * @void: Void.
- *
- * Return: None.
- */
-static void rsi_module_exit(void)
-{
-	sdio_unregister_driver(&rsi_driver);
-	rsi_dbg(INFO_ZONE, "%s: Unregistering driver\n", __func__);
-}
-
-module_init(rsi_module_init);
-module_exit(rsi_module_exit);
+module_sdio_driver(rsi_driver);
 
 MODULE_AUTHOR("Redpine Signals Inc");
 MODULE_DESCRIPTION("Common SDIO layer for RSI drivers");