lkml.org 
[lkml]   [2015]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] HID: i2c-hid: Do not fail probing if gpiolib is not enabled
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@gmail.com>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

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

--
Jiri Kosina
SUSE Labs


\
 
 \ /
  Last update: 2015-04-23 11:21    [W:0.062 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site