Skip to content

Commit

Permalink
wifi: rsi: sdio: simplify module initialization
Browse files Browse the repository at this point in the history
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-3-krzysztof.kozlowski@linaro.org
  • Loading branch information
Krzysztof Kozlowski authored and Kalle Valo committed Apr 5, 2024
1 parent 57a03d8 commit 73ec84d
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions drivers/net/wireless/rsi/rsi_91x_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 73ec84d

Please sign in to comment.