linux/drivers/hid/i2c-hid
Mika Westerberg a7d2bf25a4 HID: i2c-hid: Do not fail probing if gpiolib is not enabled
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 a485923efb ("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@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2015-04-23 10:58:16 +02:00
..
Kconfig HID: i2c-hid: enhance Kconfig 2012-12-05 10:55:03 +01:00
Makefile HID: i2c-hid: introduce HID over i2c specification implementation 2012-11-19 11:04:38 +01:00
i2c-hid.c HID: i2c-hid: Do not fail probing if gpiolib is not enabled 2015-04-23 10:58:16 +02:00