From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753281AbcEJQdS (ORCPT ); Tue, 10 May 2016 12:33:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43422 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753236AbcEJQdQ (ORCPT ); Tue, 10 May 2016 12:33:16 -0400 Date: Tue, 10 May 2016 18:33:10 +0200 From: Benjamin Tissoires To: Fabio Estevam Cc: Dmitry Torokhov , Wei Yongjun , linux-input@vger.kernel.org, linux-kernel , Bastien Nocera , Alexandre Courbot , Lejun Zhu Subject: Re: [PATCH 1/3] Input - soc_button_array: use gpio_is_valid() Message-ID: <20160510163310.GQ23234@mail.corp.redhat.com> References: <1462894673-26560-1-git-send-email-benjamin.tissoires@redhat.com> <1462894673-26560-2-git-send-email-benjamin.tissoires@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 10 May 2016 16:33:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On May 10 2016 or thereabouts, Fabio Estevam wrote: > On Tue, May 10, 2016 at 12:37 PM, Benjamin Tissoires > wrote: > > > @@ -92,7 +93,7 @@ soc_button_device_create(struct platform_device *pdev, > > continue; > > > > gpio = soc_button_lookup_gpio(&pdev->dev, info->acpi_index); > > - if (gpio < 0) > > + if (gpio_is_valid(gpio)) > > Shouldn't it be "if (!gpio_is_valid(gpio))" ? Oops, indeed. I messed up between the various trees as it's not that convenient to recompile a full kernel on an atom device. Will fix this in v2. Cheers, Benjamin