diff options
author | Yejune Deng <yejune.deng@gmail.com> | 2020-11-30 13:41:35 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-12-02 04:08:07 +0300 |
commit | 832913c31e2b1a5f17fb5633eb036d645f091f17 (patch) | |
tree | ac6cba3abbedc89ed767fea7c0af435b9a92b8e8 /drivers/net/phy/marvell.c | |
parent | aaea1babe73ea16672dea9d2566d1fe8e51277cf (diff) | |
download | linux-832913c31e2b1a5f17fb5633eb036d645f091f17.tar.xz |
net: phy: marvell: replace phy_modify()
a set of phy_set_bits() looks more neater
Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
Link: https://lore.kernel.org/r/1606732895-9136-1-git-send-email-yejune.deng@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy/marvell.c')
-rw-r--r-- | drivers/net/phy/marvell.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 587930a7f48b..620052c023a5 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -1132,8 +1132,8 @@ static int m88e1510_config_init(struct phy_device *phydev) return err; /* PHY reset is necessary after changing MODE[2:0] */ - err = phy_modify(phydev, MII_88E1510_GEN_CTRL_REG_1, 0, - MII_88E1510_GEN_CTRL_REG_1_RESET); + err = phy_set_bits(phydev, MII_88E1510_GEN_CTRL_REG_1, + MII_88E1510_GEN_CTRL_REG_1_RESET); if (err < 0) return err; @@ -1725,8 +1725,8 @@ static int m88e1318_set_wol(struct phy_device *phydev, __phy_read(phydev, MII_M1011_IEVENT); /* Enable the WOL interrupt */ - err = __phy_modify(phydev, MII_88E1318S_PHY_CSIER, 0, - MII_88E1318S_PHY_CSIER_WOL_EIE); + err = __phy_set_bits(phydev, MII_88E1318S_PHY_CSIER, + MII_88E1318S_PHY_CSIER_WOL_EIE); if (err < 0) goto error; @@ -1764,9 +1764,9 @@ static int m88e1318_set_wol(struct phy_device *phydev, goto error; /* Clear WOL status and enable magic packet matching */ - err = __phy_modify(phydev, MII_88E1318S_PHY_WOL_CTRL, 0, - MII_88E1318S_PHY_WOL_CTRL_CLEAR_WOL_STATUS | - MII_88E1318S_PHY_WOL_CTRL_MAGIC_PACKET_MATCH_ENABLE); + err = __phy_set_bits(phydev, MII_88E1318S_PHY_WOL_CTRL, + MII_88E1318S_PHY_WOL_CTRL_CLEAR_WOL_STATUS | + MII_88E1318S_PHY_WOL_CTRL_MAGIC_PACKET_MATCH_ENABLE); if (err < 0) goto error; } else { @@ -1995,7 +1995,7 @@ static int marvell_cable_test_start_common(struct phy_device *phydev) return bmsr; if (bmcr & BMCR_ANENABLE) { - ret = phy_modify(phydev, MII_BMCR, BMCR_ANENABLE, 0); + ret = phy_clear_bits(phydev, MII_BMCR, BMCR_ANENABLE); if (ret < 0) return ret; ret = genphy_soft_reset(phydev); |