Commit a45c1c10 authored by Russell King's avatar Russell King Committed by Jakub Kicinski

net: phy: at803x: use phy_modify_mmd()

Convert at803x_clk_out_config() to use phy_modify_mmd().
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/E1kyc72-0008Pq-1x@rmk-PC.armlinux.org.ukSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent a006dbf0
...@@ -529,19 +529,12 @@ static void at803x_remove(struct phy_device *phydev) ...@@ -529,19 +529,12 @@ static void at803x_remove(struct phy_device *phydev)
static int at803x_clk_out_config(struct phy_device *phydev) static int at803x_clk_out_config(struct phy_device *phydev)
{ {
struct at803x_priv *priv = phydev->priv; struct at803x_priv *priv = phydev->priv;
int val;
if (!priv->clk_25m_mask) if (!priv->clk_25m_mask)
return 0; return 0;
val = phy_read_mmd(phydev, MDIO_MMD_AN, AT803X_MMD7_CLK25M); return phy_modify_mmd(phydev, MDIO_MMD_AN, AT803X_MMD7_CLK25M,
if (val < 0) priv->clk_25m_mask, priv->clk_25m_reg);
return val;
val &= ~priv->clk_25m_mask;
val |= priv->clk_25m_reg;
return phy_write_mmd(phydev, MDIO_MMD_AN, AT803X_MMD7_CLK25M, val);
} }
static int at8031_pll_config(struct phy_device *phydev) static int at8031_pll_config(struct phy_device *phydev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment