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>
This commit is contained in:
Mika Westerberg 2013-12-10 12:00:27 +02:00 committed by Linus Walleij
parent fcffa97f8e
commit a00580c280
1 changed files with 1 additions and 1 deletions

View File

@ -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);