From c01b17dd856fa120b2970f50d9598546a4927ec3 Mon Sep 17 00:00:00 2001
From: Gerald Van Baren <vanbaren@cideas.com>
Date: Wed, 28 Nov 2007 21:24:50 -0500
Subject: [PATCH] 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 file changed, 4 insertions(+)

diff --git a/common/fdt_support.c b/common/fdt_support.c
index d05d6561eee..b5ee6e9601b 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -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
-- 
GitLab