Skip to contentSkip to conversation

Conditionally compile fdt_fixup_ethernet()

PATCH New Jerry Van Baren 1 participant 1 message Nov 29, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Conditionally compile fdt_fixup_ethernet()

Fix compiler warnings: On boards that don't have ethernets defined, don't compile fdt_fixup_ethernet().

---
 common/fdt_support.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
common/fdt_support.c +4 -0
index d05d656..b5ee6e9 100644
@@ -559,6 +559,9 @@ int fdt_fixup_memory(void *blob, u64 start, u64 size)
 	return 0;
 }
 
+#if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) ||\
+    defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3)
+
 void fdt_fixup_ethernet(void *fdt, bd_t *bd)
 {
 	int node;
@@ -604,3 +607,4 @@ void fdt_fixup_ethernet(void *fdt, bd_t *bd)
 #endif
 	}
 }
+#endif
Signature · 1 line
1.5.3.4