diff options
author | Simon Glass <sjg@chromium.org> | 2017-01-17 16:52:55 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-02-08 06:12:14 -0700 |
commit | e160f7d430f163bc42757aff3bf2bcac0a459f02 (patch) | |
tree | ce006f94b4a52f6fff567eacd86922c3be6df706 /drivers/pinctrl/pinctrl_pic32.c | |
parent | 8aa41363ebf46b9ff63b311bd2aa793c67a49def (diff) | |
download | u-boot-e160f7d430f163bc42757aff3bf2bcac0a459f02.tar.gz |
dm: core: Replace of_offset with accessor
At present devices use a simple integer offset to record the device tree
node associated with the device. In preparation for supporting a live
device tree, which uses a node pointer instead, refactor existing code to
access this field through an inline function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl_pic32.c')
-rw-r--r-- | drivers/pinctrl/pinctrl_pic32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinctrl_pic32.c b/drivers/pinctrl/pinctrl_pic32.c index 9acac29133..59466ee02e 100644 --- a/drivers/pinctrl/pinctrl_pic32.c +++ b/drivers/pinctrl/pinctrl_pic32.c @@ -253,7 +253,7 @@ static int pic32_pinctrl_get_periph_id(struct udevice *dev, int ret; u32 cell[2]; - ret = fdtdec_get_int_array(gd->fdt_blob, periph->of_offset, + ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph), "interrupts", cell, ARRAY_SIZE(cell)); if (ret < 0) return -EINVAL; @@ -310,7 +310,7 @@ static int pic32_pinctrl_probe(struct udevice *dev) struct pic32_pinctrl_priv *priv = dev_get_priv(dev); struct fdt_resource res; void *fdt = (void *)gd->fdt_blob; - int node = dev->of_offset; + int node = dev_of_offset(dev); int ret; ret = fdt_get_named_resource(fdt, node, "reg", "reg-names", |