diff options
author | Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> | 2019-05-21 22:03:12 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2019-05-24 00:01:08 +0200 |
commit | 34b1a510e872baa0512562a72069c06c340e88fd (patch) | |
tree | 7f83996d7013628ce4d040fca0e25c144ae6b326 | |
parent | 40920bdecc4e1b7096de6f546d7b5c2185554ba6 (diff) | |
download | u-boot-34b1a510e872baa0512562a72069c06c340e88fd.tar.gz u-boot-34b1a510e872baa0512562a72069c06c340e88fd.tar.xz u-boot-34b1a510e872baa0512562a72069c06c340e88fd.zip |
gpio: dwapb_gpio: fix broken dev->node
commit 1b898ffc040b ("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: commit 1b898ffc040b ("gpio: dwapb_gpio: convert to livetree")
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
-rw-r--r-- | drivers/gpio/dwapb_gpio.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c index 04a2381acd..2eb1547b4f 100644 --- a/drivers/gpio/dwapb_gpio.c +++ b/drivers/gpio/dwapb_gpio.c @@ -185,12 +185,11 @@ static int gpio_dwapb_bind(struct udevice *dev) plat->name = ofnode_get_name(node); } - ret = device_bind(dev, dev->driver, plat->name, - plat, -1, &subdev); + ret = device_bind_ofnode(dev, dev->driver, plat->name, + plat, node, &subdev); if (ret) return ret; - dev->node = node; bank++; } |