summaryrefslogtreecommitdiff
path: root/drivers/net/fm/eth.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-19 10:40:14 -0700
committerSimon Glass <sjg@chromium.org>2021-01-05 12:24:41 -0700
commitf10643cf8a4ca006d1ad194e930cd292fd869d17 (patch)
tree66cd9383fc5dbd8e02f999d1db5562995f441b21 /drivers/net/fm/eth.c
parent7d14ee443ca674314e0fe5c3e25f48e52a8fd5ee (diff)
dm: core: Access device ofnode through functions
At present ofnode is present in the device even if it is never used. With of-platdata this field is not used, so can be removed. In preparation for this, change the access to go through inline functions. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/net/fm/eth.c')
-rw-r--r--drivers/net/fm/eth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c
index a10f87eefc5..0e89e663f71 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -957,7 +957,7 @@ phy_interface_t fman_read_sys_if(struct udevice *dev)
{
const char *if_str;
- if_str = ofnode_read_string(dev->node, "phy-connection-type");
+ if_str = ofnode_read_string(dev_ofnode(dev), "phy-connection-type");
debug("MAC system interface mode %s\n", if_str);
return phy_get_interface_by_name(if_str);
@@ -969,7 +969,7 @@ static int fm_eth_bind(struct udevice *dev)
char mac_name[11];
u32 fm, num;
- if (ofnode_read_u32(ofnode_get_parent(dev->node), "cell-index", &fm)) {
+ if (ofnode_read_u32(ofnode_get_parent(dev_ofnode(dev)), "cell-index", &fm)) {
printf("FMan node property cell-index missing\n");
return -EINVAL;
}