If probed from platform data we have to use dev->id instead. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- drivers/pinctrl/pinctrl-at91.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index e212f7a..3c194df 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -618,10 +618,15 @@ static int at91_gpio_probe(struct device_d *dev) struct at91_gpio_chip *at91_gpio; struct clk *clk; int ret; - int alias_idx = of_alias_get_id(dev->device_node, "gpio"); + int alias_idx; BUG_ON(dev->id > MAX_GPIO_BANKS); + if (dev->device_node) + alias_idx = of_alias_get_id(dev->device_node, "gpio"); + else + alias_idx = dev->id; + at91_gpio = &gpio_chip[alias_idx]; clk = clk_get(dev, NULL); -- 2.1.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox