[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220818095059.8870-1-zhaoxiao@uniontech.com>
Date: Thu, 18 Aug 2022 17:50:59 +0800
From: zhaoxiao <zhaoxiao@...ontech.com>
To: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, morbo@...gle.com, weiyongjun1@...wei.com,
colin.king@...el.com
Cc: tobias@...dekranz.com, andrew@...n.ch, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, zhaoxiao <zhaoxiao@...ontech.com>
Subject: [PATCH] net: freescale: xgmac: Do not dereference fwnode in struct device
In order to make the underneath API easier to change in the future,
prevent users from dereferencing fwnode from struct device.
Instead, use the specific dev_fwnode() API for that.
Signed-off-by: zhaoxiao <zhaoxiao@...ontech.com>
---
drivers/net/ethernet/freescale/xgmac_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c
index ec90da1de030..d7d39a58cd80 100644
--- a/drivers/net/ethernet/freescale/xgmac_mdio.c
+++ b/drivers/net/ethernet/freescale/xgmac_mdio.c
@@ -355,7 +355,7 @@ static int xgmac_mdio_probe(struct platform_device *pdev)
if (ret)
return ret;
- fwnode = pdev->dev.fwnode;
+ fwnode = dev_fwnode(&pdev->dev);
if (is_of_node(fwnode))
ret = of_mdiobus_register(bus, to_of_node(fwnode));
else if (is_acpi_node(fwnode))
--
2.20.1
Powered by blists - more mailing lists