提交 a00580c2 编写于 作者: M Mika Westerberg 提交者: Linus Walleij

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: NMika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: NAlexandre Courbot <acourbot@nvidia.com>
Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 fcffa97f
......@@ -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);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册