[U-Boot] [PATCH 2/2] pinctrl: a3700: Fix the issue that gpio controller is registered with wrong node id

make at marvell.com make at marvell.com
Thu Jun 22 06:38:20 UTC 2017


From: Ken Ma <make at marvell.com>

In armada_37xx_gpiochip_register, the return value of fdtdec_get_bool
should be true when gpio-controller is found; current codes makes a
wrong inverse return value judgement, this patch fixes it.

Signed-off-by: Ken Ma <make at marvell.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Stefan Roese <sr at denx.de>
Cc: Michal Simek <michal.simek at xilinx.com>
Cc: Kostya Porotchkin <kostap at marvell.com>
---
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 2ac66ec..27165b0 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -539,7 +539,7 @@ static int armada_37xx_gpiochip_register(struct udevice *parent,
 	}
 
 	fdt_for_each_subnode(subnode, blob, node) {
-		if (!fdtdec_get_bool(blob, subnode, "gpio-controller")) {
+		if (fdtdec_get_bool(blob, subnode, "gpio-controller")) {
 			ret = 0;
 			break;
 		}
-- 
1.9.1



More information about the U-Boot mailing list