mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
staging: 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) Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20211026175038.3197397-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
8db3cbc507
commit
8b6ce9b026
@ -409,7 +409,7 @@ int cvm_oct_common_init(struct net_device *dev)
|
||||
struct octeon_ethernet *priv = netdev_priv(dev);
|
||||
int ret;
|
||||
|
||||
ret = of_get_mac_address(priv->of_node, dev->dev_addr);
|
||||
ret = of_get_ethdev_address(priv->of_node, dev);
|
||||
if (ret)
|
||||
eth_hw_addr_random(dev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user