From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752931AbbCXKol (ORCPT ); Tue, 24 Mar 2015 06:44:41 -0400 Received: from mail-oi0-f43.google.com ([209.85.218.43]:33345 "EHLO mail-oi0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752826AbbCXKoh (ORCPT ); Tue, 24 Mar 2015 06:44:37 -0400 MIME-Version: 1.0 In-Reply-To: <1427118025-4380-1-git-send-email-robert.dolca@intel.com> References: <1427118025-4380-1-git-send-email-robert.dolca@intel.com> Date: Tue, 24 Mar 2015 11:44:36 +0100 Message-ID: Subject: Re: [PATCH] IIO: Adds ACPI support for ST gyroscopes From: Linus Walleij To: Robert Dolca Cc: "linux-iio@vger.kernel.org" , Jonathan Cameron , "linux-kernel@vger.kernel.org" , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , Denis CIOCCA Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 23, 2015 at 2:40 PM, Robert Dolca wrote: Oh more comments still... > + /* Get IRQ GPIO */ > + gpiod_irq = devm_gpiod_get_index(&client->dev, 0, 0); > + if (IS_ERR(gpiod_irq)) > + return -ENODEV; Shouldn't that be devm_gpiod_get_index_optional()? I think the driver is useable also without that GPIO/IRQ and should not error out. (Will cause bugs in other platforms!) Also: maybe the GPIO/IRQ support should be in a separate patch so as not to confuse with the ACPI stuff. Yours, Linus Walleij