Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757105AbbDWI7F (ORCPT ); Thu, 23 Apr 2015 04:59:05 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42222 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755862AbbDWI7B (ORCPT ); Thu, 23 Apr 2015 04:59:01 -0400 Date: Thu, 23 Apr 2015 10:58:59 +0200 (CEST) From: Jiri Kosina To: Mika Westerberg cc: Gabriele Mazzotta , Benjamin Tissoires , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: Re: [PATCH] HID: i2c-hid: Do not fail probing if gpiolib is not enabled In-Reply-To: <1429022112-231578-1-git-send-email-mika.westerberg@linux.intel.com> Message-ID: References: <7007524.JGeOHMMZVW@xps13> <1429022112-231578-1-git-send-email-mika.westerberg@linux.intel.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 951 Lines: 26 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 > Signed-off-by: Mika Westerberg 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/