Skip to contentSkip to conversation

net: ag71xx: move clk_eth out of struct

PATCH Applied Rosen Penev 2 participants 2 messages Aug 22, 2024 – Aug 26, 2024

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

PATCH 1/1 net: ag71xx: move clk_eth out of struct

It's only used in one place. It doesn't need to be in the struct.

---
 drivers/net/ethernet/atheros/ag71xx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/atheros/ag71xx.c +4 -4
index 95da34c71b34..89cd001b385f 100644
@@ -381,7 +381,6 @@ struct ag71xx {
 
 	struct reset_control *mdio_reset;
 	struct clk *clk_mdio;
-	struct clk *clk_eth;
 };
 
 static int ag71xx_desc_empty(struct ag71xx_desc *desc)
@@ -1801,6 +1800,7 @@ static int ag71xx_probe(struct platform_device *pdev)
 	const struct ag71xx_dcfg *dcfg;
 	struct net_device *ndev;
 	struct resource *res;
+	struct clk *clk_eth;
 	int tx_size, err, i;
 	struct ag71xx *ag;
 
@@ -1831,10 +1831,10 @@ static int ag71xx_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	ag->clk_eth = devm_clk_get_enabled(&pdev->dev, "eth");
-	if (IS_ERR(ag->clk_eth)) {
+	clk_eth = devm_clk_get_enabled(&pdev->dev, "eth");
+	if (IS_ERR(clk_eth)) {
 		netif_err(ag, probe, ndev, "Failed to get eth clk.\n");
-		return PTR_ERR(ag->clk_eth);
+		return PTR_ERR(clk_eth);
 	}
 
 	SET_NETDEV_DEV(ndev, &pdev->dev);
Signature · 1 line
2.46.0
#1 lore raw
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 6 lines · On Thu, 22 Aug 2024 12:27:52 -0700 you wrote:

It's only used in one place. It doesn't need to be in the struct.

---
 drivers/net/ethernet/atheros/ag71xx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Here is the summary with links:
- [net-next] net: ag71xx: move clk_eth out of struct

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

You are awesome, thank you!

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