net: phy: use phy_init_hw instead of open-coding it
Subsystems (3)
PATCH 1/1 net: phy: use phy_init_hw instead of open-coding it
We already have a helper function which verifies a PHY device driver implements a config_init callback, then calls phy_scan_fixups() and ultimately calls the config_init callback. Use that instead of open coding it.
--- drivers/net/phy/phy.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/net/phy/phy.c +2 -5
@@ -360,11 +360,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 :
Signature · 1 line
1.8.3.2
Quoted 4 lines · Le vendredi 15 novembre 2013, 06:09:53 Florian Fainelli a écrit :
We already have a helper function which verifies a PHY device driver implements a
config_initcallback, then callsphy_scan_fixups()and ultimately calls theconfig_initcallback. Use that instead of open coding it.
I did not realize we were in the middle of the merge window, I will re-submit once net-next is open again since this is not a fix.
Signature · 1 line
Florian
David Miller
maintainerFrom: Florian Fainelli <[email protected]>
Date: Fri, 15 Nov 2013 07:03:04 +0000
Quoted 8 lines · Le vendredi 15 novembre 2013, 06:09:53 Florian Fainelli a écrit :
Quoted 4 lines
We already have a helper function which verifies a PHY device driver implements a
config_initcallback, then callsphy_scan_fixups()and ultimately calls theconfig_initcallback. Use that instead of open coding it.I did not realize we were in the middle of the merge window, I will re-submit once net-next is open again since this is not a fix.
Thank you.