Commit
0ebecb2644c8 ("net: mdio: Add helper functions for accessing
MDIO devices") added support for mdiodev accessor operations that
neatly wrap the mdiobus accessor operations. Since we are dealing with
a mdio device here, update the driver to use mdiodev_write().
Tested-by: Harini Katakam <harini.katakam@xilinx.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
int ret;
if (lp->switch_x_sgmii) {
- ret = mdiobus_write(pcs_phy->bus, pcs_phy->addr,
- XLNX_MII_STD_SELECT_REG,
+ ret = mdiodev_write(pcs_phy, XLNX_MII_STD_SELECT_REG,
interface == PHY_INTERFACE_MODE_SGMII ?
XLNX_MII_STD_SELECT_SGMII : 0);
if (ret < 0) {