aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Courbot <[email protected]>2013-11-23 14:55:52 +0900
committerLinus Walleij <[email protected]>2013-12-03 13:10:48 +0100
commit7cc67b9c74d9728ba6cbf868d7bcd2cc24de0880 (patch)
treecfcbcfebe0e303d2a23bd32800b87bf3380b0a87
parentc9a9972b6f093e4e2f81f58892a7523df894144d (diff)
gpiolib: fix lookup of platform-mapped GPIOs
A typo resulted in GPIO lookup failing unconditionally. Signed-off-by: Alexandre Courbot <[email protected]> Reported-by: Stephen Warren <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
-rw-r--r--drivers/gpio/gpiolib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index ac53a9593662..b73c39f99858 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2368,7 +2368,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;