OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f1dbb4
)
wifi: ath11k: simplify the code with module_platform_driver
author
Yang Yingliang
<yangyingliang@huawei.com>
Fri, 4 Aug 2023 09:12:55 +0000
(17:12 +0800)
committer
Kalle Valo
<quic_kvalo@quicinc.com>
Wed, 23 Aug 2023 14:08:10 +0000
(17:08 +0300)
The init/exit() of driver only calls platform_driver_register/unregister,
it can be simpilfied with module_platform_driver.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link:
https://lore.kernel.org/r/20230804091255.1347178-1-yangyingliang@huawei.com
drivers/net/wireless/ath/ath11k/ahb.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/ath/ath11k/ahb.c
b/drivers/net/wireless/ath/ath11k/ahb.c
index
ceb3ccb
..
20eee58
100644
(file)
--- 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");