summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2024-08-22 12:27:52 -0700
committerJakub Kicinski <kuba@kernel.org>2024-08-26 09:59:19 -0700
commitd2ab3bb890f6a88facf89494ce50b27ff8236d24 (patch)
tree3a4da056ce8ad09dd3193b3bd5aaddfe6340226c /drivers/net
parent1461f5a3d810869e182f1d11caaac7dee0458ff7 (diff)
net: ag71xx: move clk_eth out of struct
It's only used in one place. It doesn't need to be in the struct. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20240822192758.141201-1-rosenp@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/atheros/ag71xx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c
index ee5d429abdaa..bf02bea03a7b 100644
--- a/drivers/net/ethernet/atheros/ag71xx.c
+++ b/drivers/net/ethernet/atheros/ag71xx.c
@@ -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)
@@ -1799,6 +1798,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;
@@ -1829,10 +1829,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);