linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpiolib: fix lookup of platform-mapped GPIOs
@ 2013-11-23  5:55 Alexandre Courbot
  2013-11-25  8:58 ` Mika Westerberg
  2013-11-28 14:33 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Alexandre Courbot @ 2013-11-23  5:55 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Stephen Warren, Mika Westerberg, linux-gpio, linux-kernel,
	Alexandre Courbot

A typo resulted in GPIO lookup failing unconditionally.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reported-by: Stephen Warren <swarren@wwwdotorg.org>
---
 drivers/gpio/gpiolib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 980b08d..86caf17 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -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;
-- 
1.8.4.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-28 14:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-23  5:55 [PATCH] gpiolib: fix lookup of platform-mapped GPIOs Alexandre Courbot
2013-11-25  8:58 ` Mika Westerberg
2013-11-28 14:33 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).