summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-12-15 19:23:43 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-12-15 19:23:43 +0100
commit7f0ad5396a22c061c3c724c299848b4bc2440de5 (patch)
tree3685069aaecb43ff57bf7fdc09ed1432c69ed622 /drivers/gpio/gpiolib.c
parentLinux 4.4-rc5 (diff)
parentgpiolib: tighten up ACPI legacy gpio lookups (diff)
downloadlinux-7f0ad5396a22c061c3c724c299848b4bc2440de5.tar.xz
linux-7f0ad5396a22c061c3c724c299848b4bc2440de5.zip
Merge branch 'for-dmitry' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio into goodix
Bring in changes to ACPI GPIOLIB to better handle legacy ACPI mappings needed for subsequent Goodix driver changes.
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r--drivers/gpio/gpiolib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 2a91f3287e3b..c8a1e884da74 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1868,6 +1868,9 @@ static struct gpio_desc *acpi_find_gpio(struct device *dev, const char *con_id,
/* Then from plain _CRS GPIOs */
if (IS_ERR(desc)) {
+ if (!acpi_can_fallback_to_crs(adev, con_id))
+ return ERR_PTR(-ENOENT);
+
desc = acpi_get_gpiod_by_index(adev, NULL, idx, &info);
if (IS_ERR(desc))
return desc;