Skip to contentSkip to conversation

net: phy: smsc: use devm_clk_get_optional_enabled_with_rate()

PATCH Applied Bartosz Golaszewski 3 participants 3 messages Oct 7, 2024 – Oct 8, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

---
 drivers/net/phy/smsc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/phy/smsc.c +3 -2
index 150aea7c9c36..e1853599d9ba 100644
@@ -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
#2 lore raw
In reply to Bartosz Golaszewski
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.

---
 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