mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-18 09:51:26 +00:00
mediatek: turn mtk_eth_soc into a late_init_call
Fixes: WIFI-13776 Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
parent
a72add7ec3
commit
efbd084f57
@ -0,0 +1,25 @@
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -6192,7 +6192,21 @@ static struct platform_driver mtk_driver
|
||||
},
|
||||
};
|
||||
|
||||
-module_platform_driver(mtk_driver);
|
||||
+static struct platform_driver * const drivers[] = {
|
||||
+ &mtk_driver,
|
||||
+};
|
||||
+
|
||||
+static int __init mtk_eth_late_init(void)
|
||||
+{
|
||||
+ return platform_register_drivers(drivers, ARRAY_SIZE(drivers));
|
||||
+}
|
||||
+late_initcall(mtk_eth_late_init);
|
||||
+
|
||||
+static void __exit mtk_eth_exit(void)
|
||||
+{
|
||||
+ platform_unregister_drivers(drivers, ARRAY_SIZE(drivers));
|
||||
+}
|
||||
+module_exit(mtk_eth_exit);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
|
||||
Loading…
Reference in New Issue
Block a user