Commit 105b0468 authored by zhaoxiao's avatar zhaoxiao Committed by David S. Miller

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: default avatarzhaoxiao <zhaoxiao@uniontech.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1202cdd6
...@@ -355,7 +355,7 @@ static int xgmac_mdio_probe(struct platform_device *pdev) ...@@ -355,7 +355,7 @@ static int xgmac_mdio_probe(struct platform_device *pdev)
if (ret) if (ret)
return ret; return ret;
fwnode = pdev->dev.fwnode; fwnode = dev_fwnode(&pdev->dev);
if (is_of_node(fwnode)) if (is_of_node(fwnode))
ret = of_mdiobus_register(bus, to_of_node(fwnode)); ret = of_mdiobus_register(bus, to_of_node(fwnode));
else if (is_acpi_node(fwnode)) else if (is_acpi_node(fwnode))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment