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>
This commit is contained in:
committed by
David S. Miller
parent
e35b8d7dbb
commit
f3956ebb3b
@@ -517,7 +517,7 @@ static int enc28j60_set_mac_address(struct net_device *dev, void *addr)
|
||||
if (!is_valid_ether_addr(address->sa_data))
|
||||
return -EADDRNOTAVAIL;
|
||||
|
||||
ether_addr_copy(dev->dev_addr, address->sa_data);
|
||||
eth_hw_addr_set(dev, address->sa_data);
|
||||
return enc28j60_set_hw_macaddr(dev);
|
||||
}
|
||||
|
||||
@@ -1573,7 +1573,7 @@ static int enc28j60_probe(struct spi_device *spi)
|
||||
}
|
||||
|
||||
if (device_get_mac_address(&spi->dev, macaddr, sizeof(macaddr)))
|
||||
ether_addr_copy(dev->dev_addr, macaddr);
|
||||
eth_hw_addr_set(dev, macaddr);
|
||||
else
|
||||
eth_hw_addr_random(dev);
|
||||
enc28j60_set_hw_macaddr(dev);
|
||||
|
||||
Reference in New Issue
Block a user