Patchwork [U-Boot,v6] NET: mvgbe: avoid unused variable warning when used without phylib support

login
register
mail settings
Submitter Sascha Silbe
Date Aug. 11, 2013, 3:08 p.m.
Message ID <1376233703-20815-1-git-send-email-t-uboot@infra-silbe.de>
Download mbox | patch
Permalink /patch/266334/
State Accepted
Delegated to: Joe Hershberger
Headers show

Comments

Sascha Silbe - Aug. 11, 2013, 3:08 p.m.
Avoid a recently introduced unused variable warning for boards that
use mvgbe but not phylib.

Signed-off-by: Sascha Silbe <t-uboot@infra-silbe.de>
---
 v5->v6: Split out from CuBox support patch series.

 drivers/net/mvgbe.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 6c901d1..0cd06b6 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -420,8 +420,9 @@  static int mvgbe_init(struct eth_device *dev)
 {
 	struct mvgbe_device *dmvgbe = to_mvgbe(dev);
 	struct mvgbe_registers *regs = dmvgbe->regs;
-#if (defined (CONFIG_MII) || defined (CONFIG_CMD_MII)) \
-	 && defined (CONFIG_SYS_FAULT_ECHO_LINK_DOWN)
+#if (defined(CONFIG_MII) || defined(CONFIG_CMD_MII)) &&  \
+	!defined(CONFIG_PHYLIB) &&			 \
+	defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN)
 	int i;
 #endif
 	/* setup RX rings */