Message ID | 20151026102031.GG1526@lahna.fi.intel.com |
---|---|
State | New |
Headers | show |
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 5db3445552b1..441be96e18e7 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1765,6 +1765,11 @@ static struct gpio_desc *acpi_find_gpio(struct device *dev, const char *con_id, /* Then from plain _CRS GPIOs */ if (IS_ERR(desc)) { + /* Only fallback if the device has no properties at all */ + if (PTR_ERR(desc) == -ENODATA && + (adev->data.properties || adev->driver_gpios)) + return ERR_PTR(-ENOENT); + desc = acpi_get_gpiod_by_index(adev, NULL, idx, &info); if (IS_ERR(desc)) return desc;