]> git.sur5r.net Git - u-boot/commitdiff
net: designware: fix unused warning when CONFIG_DW_AUTONEG is enabled
authorMike Frysinger <vapier@gentoo.org>
Thu, 2 Jun 2011 05:19:37 +0000 (05:19 +0000)
committerWolfgang Denk <wd@denx.de>
Mon, 25 Jul 2011 20:19:40 +0000 (22:19 +0200)
The ctrl variable is only used when autoneg support is disabled, so only
declare it under those conditions to avoid an unused variable warning.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Vipin Kumar <vipin.kumar@st.com>
drivers/net/designware.c

index 3f5eeb73c536434040ee32024f329d3bf9083d8a..96f20d1138696d19f747d0f45a90f00ce7542994 100644 (file)
@@ -368,11 +368,13 @@ static int configure_phy(struct eth_device *dev)
 {
        struct dw_eth_dev *priv = dev->priv;
        int phy_addr;
-       u16 bmcr, ctrl;
+       u16 bmcr;
 #if defined(CONFIG_DW_AUTONEG)
        u16 bmsr;
        u32 timeout;
        u16 anlpar, btsr;
+#else
+       u16 ctrl;
 #endif
 
 #if defined(CONFIG_DW_SEARCH_PHY)