diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-06 18:07:01 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-07 13:39:51 +0100 |
commit | b8eeac565b162b6a00423a5d9ed2d1284342bdfd (patch) | |
tree | 9f5c2073f4b0155a2c122238f3939cf30bded3f4 /drivers/net/ethernet/apm | |
parent | d9eb44904e87c8ad1da0240849dbab638bacb799 (diff) |
ethernet: use device_get_ethdev_address()
Use the new device_get_ethdev_address() helper for the cases
where dev->dev_addr is passed in directly as the destination.
@@
expression dev, np;
@@
- device_get_mac_address(np, dev->dev_addr, ETH_ALEN)
+ device_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/apm')
-rw-r--r-- | drivers/net/ethernet/apm/xgene-v2/main.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/apm/xgene-v2/main.c b/drivers/net/ethernet/apm/xgene-v2/main.c index d1ebd153b7a8..d022b6db9e06 100644 --- a/drivers/net/ethernet/apm/xgene-v2/main.c +++ b/drivers/net/ethernet/apm/xgene-v2/main.c @@ -36,7 +36,7 @@ static int xge_get_resources(struct xge_pdata *pdata) return -ENOMEM; } - if (device_get_mac_address(dev, ndev->dev_addr)) + if (device_get_ethdev_address(dev, ndev)) eth_hw_addr_random(ndev); memcpy(ndev->perm_addr, ndev->dev_addr, ndev->addr_len); diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c index 4a5bf13ffae2..220dc42af31a 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c @@ -1731,7 +1731,7 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata) xgene_get_port_id_acpi(dev, pdata); #endif - if (device_get_mac_address(dev, ndev->dev_addr)) + if (device_get_ethdev_address(dev, ndev)) eth_hw_addr_random(ndev); memcpy(ndev->perm_addr, ndev->dev_addr, ndev->addr_len); |