]> git.karo-electronics.de Git - linux-beck.git/commitdiff
net: ethernet: mediatek: fix module loading automatically based on MODULE_DEVICE_TABLE
authorSean Wang <sean.wang@mediatek.com>
Wed, 14 Sep 2016 13:29:34 +0000 (21:29 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Sep 2016 08:19:54 +0000 (04:19 -0400)
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

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c

index d9199151a83e9bbe6e380bea2e724fa341dab100..3743af8f1dedd6d2462e78ef84af22f5f7fe82c7 100644 (file)
@@ -1923,6 +1923,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,