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
6 The init/exit() of driver only calls platform_driver_register/unregister,
7 it can be simpilfied with module_platform_driver.
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
13 drivers/net/wireless/ath/ath11k/ahb.c | 12 +-----------
14 1 file changed, 1 insertion(+), 11 deletions(-)
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,
22 -static int ath11k_ahb_init(void)
24 - return platform_driver_register(&ath11k_ahb_driver);
26 -module_init(ath11k_ahb_init);
28 -static void ath11k_ahb_exit(void)
30 - platform_driver_unregister(&ath11k_ahb_driver);
32 -module_exit(ath11k_ahb_exit);
33 +module_platform_driver(ath11k_ahb_driver);
35 MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN AHB devices");
36 MODULE_LICENSE("Dual BSD/GPL");