From a00580c2809f44fd1d284bf2638395a261d28cc9 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Tue, 10 Dec 2013 12:00:27 +0200 Subject: gpio / ACPI: return -ENOENT when no mapping exists 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 Acked-by: Alexandre Courbot Acked-by: Rafael J. Wysocki Signed-off-by: Linus Walleij --- drivers/gpio/gpiolib-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpio/gpiolib-acpi.c') diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index ae0ffdce8bd5..137d20c70afe 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -307,6 +307,6 @@ 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); } EXPORT_SYMBOL_GPL(acpi_get_gpiod_by_index); -- cgit v1.2.3