Skip to content

Commit

Permalink
net/nxp/lpc_eth: Drop ifdef CONFIG_OF_NET
Browse files Browse the repository at this point in the history
Since of_get_mac_address() is now declared even if CONFIG_OF_NET
is not configured, the ifdef is no longer necessary and can be
removed.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Guenter Roeck authored and David S. Miller committed Apr 2, 2013
1 parent 6c5f780 commit be0e2f1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ethernet/nxp/lpc_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1432,13 +1432,11 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)
/* Get MAC address from current HW setting (POR state is all zeros) */
__lpc_get_mac(pldat, ndev->dev_addr);

#ifdef CONFIG_OF_NET
if (!is_valid_ether_addr(ndev->dev_addr)) {
const char *macaddr = of_get_mac_address(pdev->dev.of_node);
if (macaddr)
memcpy(ndev->dev_addr, macaddr, ETH_ALEN);
}
#endif
if (!is_valid_ether_addr(ndev->dev_addr))
eth_hw_addr_random(ndev);

Expand Down

0 comments on commit be0e2f1

Please sign in to comment.