From: Florian Fainelli Date: Sun, 4 Dec 2016 20:40:29 +0000 (-0800) Subject: net: ethoc: Utilize of_get_mac_address() X-Git-Tag: MMI-PSA29.97-13-9~6662^2~79^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b34296a9c047504e2020fb4ce2f66f57bd5454a8;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git net: ethoc: Utilize of_get_mac_address() Do not open code getting the MAC address exclusively from the "local-mac-address" property, but instead use of_get_mac_address() which looks up the MAC address using the 3 typical property names. Signed-off-by: Florian Fainelli Reviewed-by: Tobias Klauser Acked-by: Thierry Reding Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c index 877c02a36c85..8d0cb5ce87ee 100644 --- a/drivers/net/ethernet/ethoc.c +++ b/drivers/net/ethernet/ethoc.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -1158,11 +1159,9 @@ static int ethoc_probe(struct platform_device *pdev) memcpy(netdev->dev_addr, pdata->hwaddr, IFHWADDRLEN); priv->phy_id = pdata->phy_id; } else { - const uint8_t *mac; + const void *mac; - mac = of_get_property(pdev->dev.of_node, - "local-mac-address", - NULL); + mac = of_get_mac_address(pdev->dev.of_node); if (mac) memcpy(netdev->dev_addr, mac, IFHWADDRLEN); priv->phy_id = -1;