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>
This commit is contained in:
Bartosz Golaszewski 2018-11-30 09:20:58 +01:00 коммит произвёл David S. Miller
Родитель 0e839df92c
Коммит cce41b8ffa
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;