Re: [PATCH] HID: i2c-hid: Do not fail probing if gpiolib is not enabled

From: Jiri Kosina
Date: Thu Apr 23 2015 - 04:59:09 EST


On Tue, 14 Apr 2015, Mika Westerberg wrote:

> Using GPIOs and gpiolib is optional. If the kernel is compiled without GPIO
> support the driver should not fail if it finds the interrupt using normal
> methods.
>
> However, commit a485923efbb8 ("HID: i2c-hid: Add support for ACPI GPIO
> interrupts") did not take into account that acpi_dev_add_driver_gpios()
> returns -ENXIO when !CONFIG_GPIOLIB.
>
> Fix this by checking the return value against -ENXIO and 0 and only in that
> case fail the probe.
>
> Reported-by: Gabriele Mazzotta <gabriele.mzt@xxxxxxxxx>
> Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>

I have applied this to for-4.1/upstream-fixes.

--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/