[PATCH] net: phy: mdio_bus: fix inverted logic in mdio_bus_match
Jan Luebbe
jlu at pengutronix.de
Tue Dec 4 12:20:36 EST 2012
The bus match functions return 0 on success.
Signed-off-by: Jan Luebbe <jlu at pengutronix.de>
---
drivers/net/phy/mdio_bus.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 9424179..aaac559 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -126,7 +126,11 @@ static int mdio_bus_match(struct device_d *dev, struct driver_d *drv)
struct phy_device *phydev = to_phy_device(dev);
struct phy_driver *phydrv = to_phy_driver(drv);
- return ((phydrv->phy_id & phydrv->phy_id_mask) ==
+ pr_debug("%s: trying to match driver %s: (0x%08x & 0x%08x) ~ 0x%08x\n",
+ dev->name, drv->name,
+ phydev->phy_id, phydrv->phy_id_mask, phydrv->phy_id);
+
+ return ((phydrv->phy_id & phydrv->phy_id_mask) !=
(phydev->phy_id & phydrv->phy_id_mask));
}
--
1.7.10.4
More information about the barebox
mailing list