summaryrefslogtreecommitdiffstats
path: root/drivers/net/davinci_emac.c
diff options
context:
space:
mode:
authorNageswari Srinivasan <nageswari@ti.com>2009-12-19 05:21:21 +0100
committerDavid S. Miller <davem@davemloft.net>2009-12-19 05:21:21 +0100
commitf9c4171e01f6befdf5d15346070b819d341c9c73 (patch)
tree84e78ae4dd2796fdf8f38a68918daeaff495a596 /drivers/net/davinci_emac.c
parente100: Fix broken cbs accounting due to missing memset. (diff)
downloadlinux-f9c4171e01f6befdf5d15346070b819d341c9c73.tar.xz
linux-f9c4171e01f6befdf5d15346070b819d341c9c73.zip
TI DaVinci EMAC: Fix MDIO bus frequency configuration
There was a typo in "if condition" checking for validity of MDIO bus frequency passed as part of platform data. Bitwise AND was being used instead of a Logical AND. Tested on: DM6467 EVM Signed-off-by: Nageswari Srinivasan <nageswari@ti.com> Acked-by: Anant Gole <anantgole@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/davinci_emac.c')
-rw-r--r--drivers/net/davinci_emac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 8edac8915ea8..34e03104c3c1 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -2272,7 +2272,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;