diff mbox

TI DaVinci EMAC: Fix MDIO bus frequency configuration

Message ID 1260955739-30348-1-git-send-email-nageswari@ti.com (mailing list archive)
State Accepted
Headers show

Commit Message

Nageswari Srinivasan Dec. 16, 2009, 9:28 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 65a2d0b..8f8c696 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -2276,7 +2276,7 @@  static int emac_mii_reset(struct mii_bus *bus)
 	unsigned int clk_div;
 	int mdio_bus_freq = emac_bus_frequency;
 
-	if (mdio_max_freq & mdio_bus_freq)
+	if (mdio_max_freq && mdio_bus_freq)
 		clk_div = ((mdio_bus_freq / mdio_max_freq) - 1);
 	else
 		clk_div = 0xFF;