net: phy: smsc: use devm_clk_get_optional_enabled_with_rate()
Subsystems (3)
PATCH 1/1 net: phy: smsc: use devm_clk_get_optional_enabled_with_rate()
From: Bartosz Golaszewski <[email protected]>
Fold the separate call to clk_set_rate() into the clock getter.
Signed-off-by Bartosz Golaszewski <[email protected]>
--- drivers/net/phy/smsc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/phy/smsc.c +3 -2
@@ -627,12 +627,13 @@ int smsc_phy_probe(struct phy_device *phydev) phydev->priv = priv;/* Make clk optional to keep DTB backward compatibility. */ - refclk =devm_clk_get_optional_enabled (dev,NULL ); + refclk =devm_clk_get_optional_enabled_with_rate (dev,NULL , +50 *1000 *1000 );if (IS_ERR (refclk))return dev_err_probe (dev,PTR_ERR (refclk),"Failed to request clock\n" ); -return clk_set_rate (refclk,50 *1000 *1000 ); +return 0 ; }EXPORT_SYMBOL_GPL (smsc_phy_probe);
Signature · 1 line
2.43.0
Quoted 5 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
Fold the separate call to
clk_set_rate()into the clock getter.Signed-off-by Bartosz Golaszewski <[email protected]>
Reviewed-by Andrew Lunn <[email protected]>
Andrew
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 7 Oct 2024 15:41:00 +0200 you wrote:
From: Bartosz Golaszewski <[email protected]>
Fold the separate call to
clk_set_rate()into the clock getter.Signed-off-by Bartosz Golaszewski <[email protected]>--- drivers/net/phy/smsc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Here is the summary with links:
- [net-next] net: phy: smsc: use devm_clk_get_optional_enabled_with_rate()
https://git.kernel.org/netdev/net-next/c/881c98f44fdf
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html