diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-03-24 13:22:44 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-03-25 13:46:09 +0100 |
commit | b3f8004b158c8b36bae83f9b64373c1d1094d17a (patch) | |
tree | c73105b2ff220c3e4e05af6d62f052526967445a /drivers | |
parent | 97d5c50665d7c49664fcb3edfdd2f42cefa8860d (diff) | |
download | barebox-b3f8004b158c8b36bae83f9b64373c1d1094d17a.tar.gz barebox-b3f8004b158c8b36bae83f9b64373c1d1094d17a.tar.xz |
net: phy: at803x: fix incorrect use of FIELD_PREP
FIELD_PREP expects mask datatype to be a constant unsigned long.
The mask constant already has the correct datatype, so pass it directly.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/at803x.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index e0e147b191..93a8bb9df1 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -141,13 +141,12 @@ static int at803x_parse_dt(struct phy_device *phydev) const struct device_d *dev = &phydev->dev; const struct device_node *node = dev->device_node; struct at803x_priv *priv = phydev->priv; - unsigned int sel, mask; + unsigned int sel; u32 freq, strength; int ret; ret = of_property_read_u32(node, "qca,clk-out-frequency", &freq); if (!ret) { - mask = AT803X_CLK_OUT_MASK; switch (freq) { case 25000000: sel = AT803X_CLK_OUT_25MHZ_XTAL; @@ -166,8 +165,8 @@ static int at803x_parse_dt(struct phy_device *phydev) return -EINVAL; } - priv->clk_25m_reg |= FIELD_PREP(mask, sel); - priv->clk_25m_mask |= mask; + priv->clk_25m_reg |= FIELD_PREP(AT803X_CLK_OUT_MASK, sel); + priv->clk_25m_mask |= AT803X_CLK_OUT_MASK; /* Fixup for the AR8030/AR8035. This chip has another mask and * doesn't support the DSP reference. Eg. the lowest bit of the |