summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2013-11-23 14:55:52 +0900
committerLinus Walleij <linus.walleij@linaro.org>2013-12-03 13:10:48 +0100
commit7cc67b9c74d9728ba6cbf868d7bcd2cc24de0880 (patch)
treecfcbcfebe0e303d2a23bd32800b87bf3380b0a87
parentc9a9972b6f093e4e2f81f58892a7523df894144d (diff)
downloadblackbird-op-linux-7cc67b9c74d9728ba6cbf868d7bcd2cc24de0880.tar.gz
blackbird-op-linux-7cc67b9c74d9728ba6cbf868d7bcd2cc24de0880.zip
gpiolib: fix lookup of platform-mapped GPIOs
A typo resulted in GPIO lookup failing unconditionally. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reported-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-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;
OpenPOWER on IntegriCloud