Skip to content

Commit 2613f95

Browse files
ffainellidavem330
authored andcommitted
net: phy: use phy_init_hw instead of open-coding it
Use phy_init_hw() instead of open-coding it in phy_mii_ioctl(), this improves consistenty and makes sure that we will not duplicate the same routine somewhere else. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 114002b commit 2613f95

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/net/phy/phy.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,8 @@ int phy_mii_ioctl(struct phy_device *phydev,
361361
mii_data->reg_num, val);
362362

363363
if (mii_data->reg_num == MII_BMCR &&
364-
val & BMCR_RESET &&
365-
phydev->drv->config_init) {
366-
phy_scan_fixups(phydev);
367-
phydev->drv->config_init(phydev);
368-
}
364+
val & BMCR_RESET)
365+
phy_init_hw(phydev);
369366
break;
370367

371368
case SIOCSHWTSTAMP:

0 commit comments

Comments
 (0)