[PATCH 07/17] net: Use CONFIG_IS_ENABLED() in eth_dev_get_mac_address()

Simon Glass sjg at chromium.org
Thu Jan 14 04:29:47 CET 2021


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 at chromium.org>
---

 net/eth-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 0156324032b..cb3f8a9095f 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -482,7 +482,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);
-- 
2.30.0.284.gd98b1dd5eaa7-goog



More information about the U-Boot mailing list