net: Use CONFIG_IS_ENABLED() in eth_dev_get_mac_address()

This function may be used in SPL where devicetree is not available.
Use the correct macro so that the function does not try to read it.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2021-01-13 20:29:47 -07:00 committed by Tom Rini
parent 7d70116fc7
commit 177e7f9ce7
1 changed files with 1 additions and 1 deletions

View File

@ -487,7 +487,7 @@ static int eth_pre_unbind(struct udevice *dev)
static bool eth_dev_get_mac_address(struct udevice *dev, u8 mac[ARP_HLEN])
{
#if IS_ENABLED(CONFIG_OF_CONTROL)
#if CONFIG_IS_ENABLED(OF_CONTROL)
const uint8_t *p;
p = dev_read_u8_array_ptr(dev, "mac-address", ARP_HLEN);