Skip to contentSkip to conversation

net: ethernet: mediatek: fix module loading automatically based on MODULE_DEVICE_TABLE

PATCH Applied [email protected] 2 participants 2 messages Sep 14, 2016 – Sep 16, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ethernet: mediatek: fix module loading automatically based on MODULE_DEVICE_TABLE

From: Sean Wang <[email protected]>

The device table is required to load modules based on modaliases. After adding MODULE_DEVICE_TABLE, below entries for example will be added to modules.alias:
alias of:N*T*Cmediatek,mt7623-ethC* mtk_eth_soc

---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/mediatek/mtk_eth_soc.c +1 -0
index a6a9a2f..b44ff3c 100644
@@ -2053,6 +2053,7 @@ const struct of_device_id of_mtk_match[] = {
 	{ .compatible = "mediatek,mt7623-eth" },
 	{},
 };
+MODULE_DEVICE_TABLE(of, of_mtk_match);
 
 static struct platform_driver mtk_driver = {
 	.probe = mtk_probe,
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw

From: <[email protected]>
Date: Wed, 14 Sep 2016 21:29:34 +0800

Quoted 8 lines

From: Sean Wang <[email protected]>

The device table is required to load modules based on modaliases. After adding MODULE_DEVICE_TABLE, below entries for example will be added to modules.alias:
alias of:N*T*Cmediatek,mt7623-ethC* mtk_eth_soc

Applied.