aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Yingliang <[email protected]>2023-08-04 17:12:55 +0800
committerKalle Valo <[email protected]>2023-08-23 17:08:10 +0300
commit749a660b39030bfbacc366cd8670df2ee0e878b2 (patch)
treed9553504598381a84143d17ef234bb753f3fad13
parent4f1dbb4904c3d06b0f0d5f2dda8ccff839110726 (diff)
wifi: ath11k: simplify the code with module_platform_driver
The init/exit() of driver only calls platform_driver_register/unregister, it can be simpilfied with module_platform_driver. Signed-off-by: Yang Yingliang <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--drivers/net/wireless/ath/ath11k/ahb.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index ceb3ccbb1827..20eee5881a31 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -1306,17 +1306,7 @@ static struct platform_driver ath11k_ahb_driver = {
.shutdown = ath11k_ahb_shutdown,
};
-static int ath11k_ahb_init(void)
-{
- return platform_driver_register(&ath11k_ahb_driver);
-}
-module_init(ath11k_ahb_init);
-
-static void ath11k_ahb_exit(void)
-{
- platform_driver_unregister(&ath11k_ahb_driver);
-}
-module_exit(ath11k_ahb_exit);
+module_platform_driver(ath11k_ahb_driver);
MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN AHB devices");
MODULE_LICENSE("Dual BSD/GPL");