diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2013-11-23 14:55:52 +0900 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-12-03 13:10:48 +0100 |
commit | 7cc67b9c74d9728ba6cbf868d7bcd2cc24de0880 (patch) | |
tree | cfcbcfebe0e303d2a23bd32800b87bf3380b0a87 /drivers/gpio | |
parent | c9a9972b6f093e4e2f81f58892a7523df894144d (diff) | |
download | linux-7cc67b9c74d9728ba6cbf868d7bcd2cc24de0880.tar.bz2 |
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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpiolib.c | 2 |
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; |