Skip to contentSkip to conversation

gpiolib: fix lookup of platform-mapped GPIOs

PATCH In review Alexandre Courbot 3 participants 3 messages Nov 23, 2013 – Nov 28, 2013 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpiolib: fix lookup of platform-mapped GPIOs

A typo resulted in GPIO lookup failing unconditionally.

---
 drivers/gpio/gpiolib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpiolib.c +1 -1
index 980b08d..86caf17 100644
@@ -2367,7 +2367,7 @@ static struct gpio_desc *gpiod_find(struct device *dev, const char *con_id,
 				continue;
 			}
 
-			if (chip->ngpio >= p->chip_hwnum) {
+			if (chip->ngpio <= p->chip_hwnum) {
 				dev_warn(dev, "GPIO chip %s has %d GPIOs\n",
 					 chip->label, chip->ngpio);
 				continue;
Signature · 1 line
1.8.4.2