aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mediatek
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-06 18:06:56 -0700
committerDavid S. Miller <davem@davemloft.net>2021-10-07 13:39:51 +0100
commit9ca01b25dffffecf6c59339aad6b4736680e9fa3 (patch)
tree09db4109c0c73f94baa22101c10af5a01f61fcdf /drivers/net/ethernet/mediatek
parentof: net: add a helper for loading netdev->dev_addr (diff)
downloadlinux-dev-9ca01b25dffffecf6c59339aad6b4736680e9fa3.tar.xz
linux-dev-9ca01b25dffffecf6c59339aad6b4736680e9fa3.zip
ethernet: use of_get_ethdev_address()
Use the new of_get_ethdev_address() helper for the cases where dev->dev_addr is passed in directly as the destination. @@ expression dev, np; @@ - of_get_mac_address(np, dev->dev_addr) + of_get_ethdev_address(np, dev) Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mediatek')
-rw-r--r--drivers/net/ethernet/mediatek/mtk_eth_soc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 398c23cec815..75d67d1b5f6b 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2588,7 +2588,7 @@ static int __init mtk_init(struct net_device *dev)
struct mtk_eth *eth = mac->hw;
int ret;
- ret = of_get_mac_address(mac->of_node, dev->dev_addr);
+ ret = of_get_ethdev_address(mac->of_node, dev);
if (ret) {
/* If the mac address is invalid, use random mac address */
eth_hw_addr_random(dev);