net: phy: use phy_init_hw instead of open-coding it
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 6 Dec 2013 21:01:31 +0000 (13:01 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Dec 2013 01:38:58 +0000 (20:38 -0500)
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>
drivers/net/phy/phy.c

index 05cb8fe742f914529127b8b0b5d9858ef2da49ac..5d7101b3b604e5accc02671c2ec4c369af6d1635 100644 (file)
@@ -361,11 +361,8 @@ int phy_mii_ioctl(struct phy_device *phydev,
                              mii_data->reg_num, val);
 
                if (mii_data->reg_num == MII_BMCR &&
-                   val & BMCR_RESET &&
-                   phydev->drv->config_init) {
-                       phy_scan_fixups(phydev);
-                       phydev->drv->config_init(phydev);
-               }
+                   val & BMCR_RESET)
+                       phy_init_hw(phydev);
                break;
 
        case SIOCSHWTSTAMP: