summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/faraday
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-01 14:32:23 -0700
committerDavid S. Miller <davem@davemloft.net>2021-10-02 14:18:25 +0100
commitf3956ebb3bf06ab2266ad5ee2214aed46405810c (patch)
tree98f917e2c4534719b049b7ba2326dfd53f16516b /drivers/net/ethernet/faraday
parente35b8d7dbb094c79daf920797c372911edc2d525 (diff)
ethernet: use eth_hw_addr_set() instead of ether_addr_copy()
Convert Ethernet from ether_addr_copy() to eth_hw_addr_set(): @@ expression dev, np; @@ - ether_addr_copy(dev->dev_addr, np) + eth_hw_addr_set(dev, np) Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/faraday')
-rw-r--r--drivers/net/ethernet/faraday/ftgmac100.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index ff76e401a014..ab9267225573 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -186,7 +186,7 @@ static void ftgmac100_initial_mac(struct ftgmac100 *priv)
addr = device_get_mac_address(priv->dev, mac, ETH_ALEN);
if (addr) {
- ether_addr_copy(priv->netdev->dev_addr, mac);
+ eth_hw_addr_set(priv->netdev, mac);
dev_info(priv->dev, "Read MAC address %pM from device tree\n",
mac);
return;
@@ -203,7 +203,7 @@ static void ftgmac100_initial_mac(struct ftgmac100 *priv)
mac[5] = l & 0xff;
if (is_valid_ether_addr(mac)) {
- ether_addr_copy(priv->netdev->dev_addr, mac);
+ eth_hw_addr_set(priv->netdev, mac);
dev_info(priv->dev, "Read MAC address %pM from chip\n", mac);
} else {
eth_hw_addr_random(priv->netdev);