diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-08-26 12:06:47 (GMT) |
---|---|---|
committer | Lennert Buytenhek <buytenh@marvell.com> | 2008-09-05 04:33:59 (GMT) |
commit | ac840605f3b1d9b99e1e6629a54994f8e003ff91 (patch) | |
tree | c0d47ef7ca41c4f88baa5e66b07f95ad586c7341 /drivers/net/mv643xx_eth.c | |
parent | fc0eb9f226d8ecc8e3b563bf808bd6d61a6153a1 (diff) | |
download | linux-ac840605f3b1d9b99e1e6629a54994f8e003ff91.tar.xz |
mv643xx_eth: remove force_phy_addr field
Currently, there are two different fields in the
mv643xx_eth_platform_data struct that together describe the PHY
address -- one field (phy_addr) has the address of the PHY, but if
that address is zero, a second field (force_phy_addr) needs to be
set to distinguish the actual address zero from a zero due to not
having filled in the PHY address explicitly (which should mean
'use the default PHY address').
If we are a bit smarter about the encoding of the phy_addr field,
we can avoid the need for a second field -- this patch does that.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'drivers/net/mv643xx_eth.c')
-rw-r--r-- | drivers/net/mv643xx_eth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 6d3da78..b4850cf 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c @@ -2412,10 +2412,10 @@ static void set_params(struct mv643xx_eth_private *mp, else uc_addr_get(mp, dev->dev_addr); - if (pd->phy_addr == -1) { + if (pd->phy_addr == MV643XX_ETH_PHY_NONE) { mp->phy_addr = -1; } else { - if (pd->force_phy_addr || pd->phy_addr) { + if (pd->phy_addr != MV643XX_ETH_PHY_ADDR_DEFAULT) { mp->phy_addr = pd->phy_addr & 0x3f; phy_addr_set(mp, mp->phy_addr); } else { |