gpio: dwapb_gpio: fix broken dev->node
commit1b898ffc04
("gpio: dwapb_gpio: convert to livetree") introduced a bug in that dev->node of the gpio chip was accidentally set to the of_node of its bank subnode. What it meant to do was assign subdev->node, not dev->node. While this doesn't affect too many use cases, iterating over the gpio chip's properties doesn't work any more after that, so fix this. Fixes: commit1b898ffc04
("gpio: dwapb_gpio: convert to livetree") Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
This commit is contained in:
parent
40920bdecc
commit
34b1a510e8
@ -185,12 +185,11 @@ static int gpio_dwapb_bind(struct udevice *dev)
|
|||||||
plat->name = ofnode_get_name(node);
|
plat->name = ofnode_get_name(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = device_bind(dev, dev->driver, plat->name,
|
ret = device_bind_ofnode(dev, dev->driver, plat->name,
|
||||||
plat, -1, &subdev);
|
plat, node, &subdev);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
dev->node = node;
|
|
||||||
bank++;
|
bank++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user