[U-Boot] [PATCH v2 2/7] rockchip: pinctrl: rv1108: access of-offset via dev_of_offset(...)

Philipp Tomsich philipp.tomsich at theobroma-systems.com
Tue Jun 6 13:42:27 UTC 2017


After rebasing to u-boot-rockchip/master at 2b19b2f, buildman fails for
rv1108 with:
  ../drivers/pinctrl/rockchip/pinctrl_rv1108.c: In function 'rv1108_pinctrl_get_periph_id':
  ../drivers/pinctrl/rockchip/pinctrl_rv1108.c:111:49: error: 'struct udevice' has no member named 'of_offset'
    ret = fdtdec_get_int_array(gd->fdt_blob, periph->of_offset,
                                                     ^

This change access the of-offset of periph via the dev_of_offset()
helper-function to fix this issue and (hopefully) to ensure it doesn't
recur if there's more changes to the DM subsystem.

Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>

---

Changes in v2:
- (new patch) access of-offset of periph via dev_of_offset in the RV1108
  pinctrl driver to fix a buildman failure for u-boot-rockchip/master at 2b19b2f

 drivers/pinctrl/rockchip/pinctrl_rv1108.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/rockchip/pinctrl_rv1108.c b/drivers/pinctrl/rockchip/pinctrl_rv1108.c
index d98ec81..bdf3910 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rv1108.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rv1108.c
@@ -108,7 +108,7 @@ static int rv1108_pinctrl_get_periph_id(struct udevice *dev,
 	u32 cell[3];
 	int ret;
 
-	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;
-- 
2.1.4



More information about the U-Boot mailing list