Skip to content

Commit 04792c1

Browse files
krzkUlf Hansson
authored andcommitted
wifi: ath10k: sdio: 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(). Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240403-module-owner-sdio-v2-3-ae46d6b955eb@linaro.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 327e3d0 commit 04792c1

1 file changed

Lines changed: 1 addition & 19 deletions

File tree

  • drivers/net/wireless/ath/ath10k

drivers/net/wireless/ath/ath10k/sdio.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2671,25 +2671,7 @@ static struct sdio_driver ath10k_sdio_driver = {
26712671
.pm = ATH10K_SDIO_PM_OPS,
26722672
},
26732673
};
2674-
2675-
static int __init ath10k_sdio_init(void)
2676-
{
2677-
int ret;
2678-
2679-
ret = sdio_register_driver(&ath10k_sdio_driver);
2680-
if (ret)
2681-
pr_err("sdio driver registration failed: %d\n", ret);
2682-
2683-
return ret;
2684-
}
2685-
2686-
static void __exit ath10k_sdio_exit(void)
2687-
{
2688-
sdio_unregister_driver(&ath10k_sdio_driver);
2689-
}
2690-
2691-
module_init(ath10k_sdio_init);
2692-
module_exit(ath10k_sdio_exit);
2674+
module_sdio_driver(ath10k_sdio_driver);
26932675

26942676
MODULE_AUTHOR("Qualcomm Atheros");
26952677
MODULE_DESCRIPTION("Driver support for Qualcomm Atheros 802.11ac WLAN SDIO devices");

0 commit comments

Comments
 (0)