diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-19 10:40:14 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-01-05 12:24:41 -0700 |
commit | f10643cf8a4ca006d1ad194e930cd292fd869d17 (patch) | |
tree | 66cd9383fc5dbd8e02f999d1db5562995f441b21 /drivers/gpio | |
parent | 7d14ee443ca674314e0fe5c3e25f48e52a8fd5ee (diff) | |
download | u-boot-f10643cf8a4ca006d1ad194e930cd292fd869d17.tar.gz |
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/gpio')
-rw-r--r-- | drivers/gpio/mpc8xxx_gpio.c | 4 | ||||
-rw-r--r-- | drivers/gpio/octeon_gpio.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/mpc8xxx_gpio.c b/drivers/gpio/mpc8xxx_gpio.c index 2bc1a0d571..a964347fa3 100644 --- a/drivers/gpio/mpc8xxx_gpio.c +++ b/drivers/gpio/mpc8xxx_gpio.c @@ -191,7 +191,7 @@ static int mpc8xxx_gpio_of_to_plat(struct udevice *dev) u32 i; u32 reg[4]; - if (ofnode_read_bool(dev->node, "little-endian")) + if (ofnode_read_bool(dev_ofnode(dev), "little-endian")) data->little_endian = true; if (data->little_endian) @@ -257,7 +257,7 @@ static int mpc8xxx_gpio_probe(struct udevice *dev) if (!str) return -ENOMEM; - if (ofnode_device_is_compatible(dev->node, "fsl,qoriq-gpio")) { + if (ofnode_device_is_compatible(dev_ofnode(dev), "fsl,qoriq-gpio")) { unsigned long gpibe = data->addr + sizeof(struct ccsr_gpio) - sizeof(u32); diff --git a/drivers/gpio/octeon_gpio.c b/drivers/gpio/octeon_gpio.c index 958516d8f8..42eae79d8c 100644 --- a/drivers/gpio/octeon_gpio.c +++ b/drivers/gpio/octeon_gpio.c @@ -190,7 +190,7 @@ static int octeon_gpio_probe(struct udevice *dev) GPIO_CONST_GPIOS_MASK; } else { priv->base = dev_remap_addr(dev); - uc_priv->gpio_count = ofnode_read_u32_default(dev->node, + uc_priv->gpio_count = ofnode_read_u32_default(dev_ofnode(dev), "nr-gpios", 32); } |