From e160f7d430f163bc42757aff3bf2bcac0a459f02 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 17 Jan 2017 16:52:55 -0700 Subject: 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 --- drivers/pinctrl/pinctrl-at91-pio4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/pinctrl/pinctrl-at91-pio4.c') diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c index 6d4aadc..5c6bff5 100644 --- a/drivers/pinctrl/pinctrl-at91-pio4.c +++ b/drivers/pinctrl/pinctrl-at91-pio4.c @@ -109,7 +109,7 @@ static int atmel_pinctrl_set_state(struct udevice *dev, struct udevice *config) { struct atmel_pio4_port *bank_base; const void *blob = gd->fdt_blob; - int node = config->of_offset; + int node = dev_of_offset(config); u32 offset, func, bank, line; u32 cells[MAX_PINMUX_ENTRIES]; u32 i, conf; -- cgit v1.1