mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
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:
parent
fcffa97f8e
commit
a00580c280
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue