public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio / ACPI: return -ENOENT when no mapping exists
@ 2013-12-10 10:00 Mika Westerberg
  2013-12-10 11:11 ` Alex Courbot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mika Westerberg @ 2013-12-10 10:00 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Alex Courbot, Rafael J. Wysocki, linux-gpio, Mathias Nyman,
	linux-acpi, Mika Westerberg

Doing this allows drivers to distinguish between a real error case (if
there was an error when we tried to resolve the GPIO) and when the optional
GPIO line was not available.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/gpio/gpiolib-acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index 8506e4ce41f7..716ee9843110 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -307,7 +307,7 @@ struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index,
 	if (lookup.desc && info)
 		*info = lookup.info;
 
-	return lookup.desc ? lookup.desc : ERR_PTR(-ENODEV);
+	return lookup.desc ? lookup.desc : ERR_PTR(-ENOENT);
 }
 
 void acpi_gpiochip_add(struct gpio_chip *chip)
-- 
1.8.5.1


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

end of thread, other threads:[~2013-12-12 20:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10 10:00 [PATCH] gpio / ACPI: return -ENOENT when no mapping exists Mika Westerberg
2013-12-10 11:11 ` Alex Courbot
2013-12-12  1:39 ` Rafael J. Wysocki
2013-12-12 20:57 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox