aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/phy/phy-core.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/phy/phy-core.c b/drivers/net/phy/phy-core.c
index c0ad08fa9d2c..2c985c6e2cdd 100644
--- a/drivers/net/phy/phy-core.c
+++ b/drivers/net/phy/phy-core.c
@@ -236,13 +236,14 @@ static void mmd_phy_indirect(struct mii_bus *bus, int phy_addr, int devad,
236 u16 regnum) 236 u16 regnum)
237{ 237{
238 /* Write the desired MMD Devad */ 238 /* Write the desired MMD Devad */
239 bus->write(bus, phy_addr, MII_MMD_CTRL, devad); 239 __mdiobus_write(bus, phy_addr, MII_MMD_CTRL, devad);
240 240
241 /* Write the desired MMD register address */ 241 /* Write the desired MMD register address */
242 bus->write(bus, phy_addr, MII_MMD_DATA, regnum); 242 __mdiobus_write(bus, phy_addr, MII_MMD_DATA, regnum);
243 243
244 /* Select the Function : DATA with no post increment */ 244 /* Select the Function : DATA with no post increment */
245 bus->write(bus, phy_addr, MII_MMD_CTRL, devad | MII_MMD_CTRL_NOINCR); 245 __mdiobus_write(bus, phy_addr, MII_MMD_CTRL,
246 devad | MII_MMD_CTRL_NOINCR);
246} 247}
247 248
248/** 249/**
@@ -275,7 +276,7 @@ int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum)
275 mmd_phy_indirect(bus, phy_addr, devad, regnum); 276 mmd_phy_indirect(bus, phy_addr, devad, regnum);
276 277
277 /* Read the content of the MMD's selected register */ 278 /* Read the content of the MMD's selected register */
278 val = bus->read(bus, phy_addr, MII_MMD_DATA); 279 val = __mdiobus_read(bus, phy_addr, MII_MMD_DATA);
279 mutex_unlock(&bus->mdio_lock); 280 mutex_unlock(&bus->mdio_lock);
280 } 281 }
281 return val; 282 return val;
@@ -314,7 +315,7 @@ int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val)
314 mmd_phy_indirect(bus, phy_addr, devad, regnum); 315 mmd_phy_indirect(bus, phy_addr, devad, regnum);
315 316
316 /* Write the data into MMD's selected register */ 317 /* Write the data into MMD's selected register */
317 bus->write(bus, phy_addr, MII_MMD_DATA, val); 318 __mdiobus_write(bus, phy_addr, MII_MMD_DATA, val);
318 mutex_unlock(&bus->mdio_lock); 319 mutex_unlock(&bus->mdio_lock);
319 320
320 ret = 0; 321 ret = 0;