From: Shaohui Xie <shaohui....@freescale.com>

phy_shutdown should be wrapped by CONFIG_PHYLIB.

Signed-off-by: Shaohui Xie <shaohui....@freescale.com>
Signed-off-by: Mingkai Hu <mingkai...@freescale.com>
Signed-off-by: Gong Qianyu <qianyu.g...@freescale.com>
---
 drivers/net/fm/eth.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c
index cd05dbc..67c96a2 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -453,8 +453,10 @@ static void fm_eth_halt(struct eth_device *dev)
        /* disable bmi Rx port */
        bmi_rx_port_disable(fm_eth->rx_port);
 
+#ifdef CONFIG_PHYLIB
        if (fm_eth->phydev)
                phy_shutdown(fm_eth->phydev);
+#endif
 }
 
 static int fm_eth_send(struct eth_device *dev, void *buf, int len)
-- 
2.1.0.27.g96db324

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to