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@uniontech.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1202cdd665
commit
105b0468d7
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user