diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2013-12-10 05:00:27 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-12-12 15:56:36 -0500 |
commit | a00580c2809f44fd1d284bf2638395a261d28cc9 (patch) | |
tree | a7a161ccfe37bf1ee01c8968b338ff6091ab7343 /drivers/gpio/gpiolib-acpi.c | |
parent | fcffa97f8e182306cf76f101ccb3b397399da772 (diff) |
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 <mika.westerberg@linux.intel.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib-acpi.c')
-rw-r--r-- | drivers/gpio/gpiolib-acpi.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
307 | if (lookup.desc && info) | 307 | if (lookup.desc && info) |
308 | *info = lookup.info; | 308 | *info = lookup.info; |
309 | 309 | ||
310 | return lookup.desc ? lookup.desc : ERR_PTR(-ENODEV); | 310 | return lookup.desc ? lookup.desc : ERR_PTR(-ENOENT); |
311 | } | 311 | } |
312 | EXPORT_SYMBOL_GPL(acpi_get_gpiod_by_index); | 312 | EXPORT_SYMBOL_GPL(acpi_get_gpiod_by_index); |