19873339b23741f74c0fd34e6e2b6d4cbdb57b59
[openwrt/staging/stintel.git] /
1 From 749a660b39030bfbacc366cd8670df2ee0e878b2 Mon Sep 17 00:00:00 2001
2 From: Yang Yingliang <yangyingliang@huawei.com>
3 Date: Fri, 4 Aug 2023 17:12:55 +0800
4 Subject: [PATCH] wifi: ath11k: simplify the code with module_platform_driver
5
6 The init/exit() of driver only calls platform_driver_register/unregister,
7 it can be simpilfied with module_platform_driver.
8
9 Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
10 Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
11 Link: https://lore.kernel.org/r/20230804091255.1347178-1-yangyingliang@huawei.com
12 ---
13 drivers/net/wireless/ath/ath11k/ahb.c | 12 +-----------
14 1 file changed, 1 insertion(+), 11 deletions(-)
15
16 --- a/drivers/net/wireless/ath/ath11k/ahb.c
17 +++ b/drivers/net/wireless/ath/ath11k/ahb.c
18 @@ -1306,17 +1306,7 @@ static struct platform_driver ath11k_ahb
19 .shutdown = ath11k_ahb_shutdown,
20 };
21
22 -static int ath11k_ahb_init(void)
23 -{
24 - return platform_driver_register(&ath11k_ahb_driver);
25 -}
26 -module_init(ath11k_ahb_init);
27 -
28 -static void ath11k_ahb_exit(void)
29 -{
30 - platform_driver_unregister(&ath11k_ahb_driver);
31 -}
32 -module_exit(ath11k_ahb_exit);
33 +module_platform_driver(ath11k_ahb_driver);
34
35 MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN AHB devices");
36 MODULE_LICENSE("Dual BSD/GPL");