Commit 7cc67b9c authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Linus Walleij

gpiolib: fix lookup of platform-mapped GPIOs

A typo resulted in GPIO lookup failing unconditionally.
Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Reported-by: default avatarStephen Warren <swarren@wwwdotorg.org>
Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent c9a9972b
...@@ -2368,7 +2368,7 @@ static struct gpio_desc *gpiod_find(struct device *dev, const char *con_id, ...@@ -2368,7 +2368,7 @@ static struct gpio_desc *gpiod_find(struct device *dev, const char *con_id,
continue; continue;
} }
if (chip->ngpio >= p->chip_hwnum) { if (chip->ngpio <= p->chip_hwnum) {
dev_warn(dev, "GPIO chip %s has %d GPIOs\n", dev_warn(dev, "GPIO chip %s has %d GPIOs\n",
chip->label, chip->ngpio); chip->label, chip->ngpio);
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment