Skip to contentSkip to conversation

net: ethernet: fs_enet: Make the per clock optional

PATCH Applied Maxime Chevallier 3 participants 3 messages Sep 14, 2024 – Sep 15, 2024

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

PATCH 1/1 net: ethernet: fs_enet: Make the per clock optional

Some platforms that use fs_enet don't have the PER register clock. This optional dependency on the clock was incorrectly made mandatory when switching to devm_ accessors.

Fixes c614acf6e8e1 ("net: ethernet: fs_enet: simplify clock handling with devm accessors")

---
This patch fixes a commit in net-next.

 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +1 -1
index d300b01859a1..3425c4a6abcb 100644
@@ -895,7 +895,7 @@ static int fs_enet_probe(struct platform_device *ofdev)
 	 * but require enable to succeed when a clock was specified/found,
 	 * keep a reference to the clock upon successful acquisition
 	 */
-	clk = devm_clk_get_enabled(&ofdev->dev, "per");
+	clk = devm_clk_get_optional_enabled(&ofdev->dev, "per");
 	if (IS_ERR(clk))
 		goto out_free_fpi;
 
Signature · 1 line
2.46.0
Reviewed-by on v1 1/1
#1 lore raw

Le 14/09/2024 à 10:18, Maxime Chevallier a écrit :

Quoted 19 lines

Some platforms that use fs_enet don't have the PER register clock. This optional dependency on the clock was incorrectly made mandatory when switching to devm_ accessors.

Fixes c614acf6e8e1 ("net: ethernet: fs_enet: simplify clock handling with devm accessors")

---
This patch fixes a commit in net-next.

  drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +0 -0
index d300b01859a1..3425c4a6abcb 100644

drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c static int fs_enet_probe(struct platform_device *ofdev) · line 901

Quoted 8 lines
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +1 -1
@@ -895,7 +895,7 @@ static int fs_enet_probe(struct platform_device *ofdev)
  	 * but require enable to succeed when a clock was specified/found,
  	 * keep a reference to the clock upon successful acquisition
  	 */
-	clk = devm_clk_get_enabled(&ofdev->dev, "per");
+	clk = devm_clk_get_optional_enabled(&ofdev->dev, "per");
  	if (IS_ERR(clk))
  		goto out_free_fpi;
 

Thanks

#2 lore raw
In reply to Maxime Chevallier
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 10 lines · On Sat, 14 Sep 2024 10:18:20 +0200 you wrote:

Some platforms that use fs_enet don't have the PER register clock. This optional dependency on the clock was incorrectly made mandatory when switching to devm_ accessors.

Fixes c614acf6e8e1 ("net: ethernet: fs_enet: simplify clock handling with devm accessors")

[...]

Here is the summary with links:
- [net-next] net: ethernet: fs_enet: Make the per clock optional

    https://git.kernel.org/netdev/net-next/c/c209847b8974

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html