Message ID | c84cad5a-ed93-b664-340e-eca99716ec18@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: phy: move getting (R)MII refclock to phylib | expand |
Context | Check | Description |
---|---|---|
netdev/series_format | success | Posting correctly formatted |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 18 this patch: 18 |
netdev/cc_maintainers | success | CCed 8 of 8 maintainers |
netdev/build_clang | success | Errors and warnings before: 18 this patch: 18 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/deprecated_api | success | None detected |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 18 this patch: 18 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 19 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index e26c6723c..dfd2c1d0f 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -1884,7 +1884,6 @@ static int kszphy_probe(struct phy_device *phydev) const struct kszphy_type *type = phydev->drv->driver_data; const struct device_node *np = phydev->mdio.dev.of_node; struct kszphy_priv *priv; - struct clk *clk; priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); if (!priv) @@ -1896,10 +1895,8 @@ static int kszphy_probe(struct phy_device *phydev) kszphy_parse_led_mode(phydev); - clk = devm_clk_get(&phydev->mdio.dev, "rmii-ref"); - /* NOTE: clk may be NULL if building without CONFIG_HAVE_CLK */ - if (!IS_ERR_OR_NULL(clk)) { - unsigned long rate = clk_get_rate(clk); + if (phydev->refclk) { + unsigned long rate = clk_get_rate(phydev->refclk); bool rmii_ref_clk_sel_25_mhz; if (type)
Now that getting the reference clock has been moved to phylib, we can remove it here. Only one clock is supported by the PHY, therefore it's ok that we now use the first clock instead of the named one. Note that currently devm_clk_get is used instead of devm_clk_get_optional, but nevertheless the clock is treated as optional. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> --- drivers/net/phy/micrel.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)