summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2018-11-30 09:20:58 +0100
committerDavid S. Miller <davem@davemloft.net>2018-12-03 15:40:30 -0800
commitcce41b8ffa4b3978dfbcbf3fd2e7397253346245 (patch)
treedfa2d32eccb9b10e71a2073afb9a25563db35df4
parent0e839df92cf37be4adef7e661813206cd2b32d66 (diff)
downloadtalos-obmc-linux-cce41b8ffa4b3978dfbcbf3fd2e7397253346245.tar.gz
talos-obmc-linux-cce41b8ffa4b3978dfbcbf3fd2e7397253346245.zip
net: cadence: switch to using nvmem_get_mac_address()
We now have a generalized helper routine to read the MAC address from nvmem which takes struct device as argument. The nvmem subsystem will then try device tree first before all other potential providers. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/cadence/macb_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 1d86b4d5645a..d9a208f7bb40 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -4055,7 +4055,7 @@ static int macb_probe(struct platform_device *pdev)
if (mac) {
ether_addr_copy(bp->dev->dev_addr, mac);
} else {
- err = of_get_nvmem_mac_address(np, bp->dev->dev_addr);
+ err = nvmem_get_mac_address(&pdev->dev, bp->dev->dev_addr);
if (err) {
if (err == -EPROBE_DEFER)
goto err_out_free_netdev;
OpenPOWER on IntegriCloud