From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH v5 1/6] mfd: fsl imx25 Touchscreen ADC driver Date: Wed, 18 Feb 2015 08:01:56 +0000 Message-ID: <20150218080156.GA5781@x1> References: <1422108103-15052-1-git-send-email-mpa@pengutronix.de> <1422108103-15052-2-git-send-email-mpa@pengutronix.de> <20150216133829.GG14545@x1> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-wg0-f54.google.com ([74.125.82.54]:51478 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751794AbbBRICD (ORCPT ); Wed, 18 Feb 2015 03:02:03 -0500 Received: by mail-wg0-f54.google.com with SMTP id y19so40499499wgg.13 for ; Wed, 18 Feb 2015 00:02:01 -0800 (PST) Content-Disposition: inline In-Reply-To: Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Fabio Estevam Cc: Markus Pargmann , Shawn Guo , Samuel Ortiz , Dmitry Torokhov , Jonathan Cameron , Peter Meerwald , Hartmut Knaack , Denis Carikli , Eric =?iso-8859-1?Q?B=E9nard?= , Sascha Hauer , "linux-arm-kernel@lists.infradead.org" , linux-input@vger.kernel.org, linux-iio@vger.kernel.org, Lars-Peter Clausen , "devicetree@vger.kernel.org" , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala On Tue, 17 Feb 2015, Fabio Estevam wrote: > On Mon, Feb 16, 2015 at 11:38 AM, Lee Jones wr= ote: >=20 > >> +static int mx25_tsadc_setup_irq(struct platform_device *pdev, > >> + struct mx25_tsadc *tsadc) > >> +{ > >> + struct device *dev =3D &pdev->dev; > >> + struct device_node *np =3D dev->of_node; > >> + int irq; > >> + > >> + irq =3D platform_get_irq(pdev, 0); > >> + if (irq < 0) { > > > > What if 0 is returned? >=20 > Then imx25.dtsi would be passing irq=3D0 for the ADC, which would be > totally wrong. Exactly, so it should be <=3D. --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-input" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f181.google.com ([74.125.82.181]:33788 "EHLO mail-we0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751620AbbBRICD (ORCPT ); Wed, 18 Feb 2015 03:02:03 -0500 Received: by wevk48 with SMTP id k48so3032940wev.0 for ; Wed, 18 Feb 2015 00:02:01 -0800 (PST) Date: Wed, 18 Feb 2015 08:01:56 +0000 From: Lee Jones To: Fabio Estevam Cc: Markus Pargmann , Shawn Guo , Samuel Ortiz , Dmitry Torokhov , Jonathan Cameron , Peter Meerwald , Hartmut Knaack , Denis Carikli , Eric =?iso-8859-1?Q?B=E9nard?= , Sascha Hauer , "linux-arm-kernel@lists.infradead.org" , linux-input@vger.kernel.org, linux-iio@vger.kernel.org, Lars-Peter Clausen , "devicetree@vger.kernel.org" , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala Subject: Re: [PATCH v5 1/6] mfd: fsl imx25 Touchscreen ADC driver Message-ID: <20150218080156.GA5781@x1> References: <1422108103-15052-1-git-send-email-mpa@pengutronix.de> <1422108103-15052-2-git-send-email-mpa@pengutronix.de> <20150216133829.GG14545@x1> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 In-Reply-To: Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org On Tue, 17 Feb 2015, Fabio Estevam wrote: > On Mon, Feb 16, 2015 at 11:38 AM, Lee Jones wrote: > > >> +static int mx25_tsadc_setup_irq(struct platform_device *pdev, > >> + struct mx25_tsadc *tsadc) > >> +{ > >> + struct device *dev = &pdev->dev; > >> + struct device_node *np = dev->of_node; > >> + int irq; > >> + > >> + irq = platform_get_irq(pdev, 0); > >> + if (irq < 0) { > > > > What if 0 is returned? > > Then imx25.dtsi would be passing irq=0 for the ADC, which would be > totally wrong. Exactly, so it should be <=. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 From: lee.jones@linaro.org (Lee Jones) Date: Wed, 18 Feb 2015 08:01:56 +0000 Subject: [PATCH v5 1/6] mfd: fsl imx25 Touchscreen ADC driver In-Reply-To: References: <1422108103-15052-1-git-send-email-mpa@pengutronix.de> <1422108103-15052-2-git-send-email-mpa@pengutronix.de> <20150216133829.GG14545@x1> Message-ID: <20150218080156.GA5781@x1> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, 17 Feb 2015, Fabio Estevam wrote: > On Mon, Feb 16, 2015 at 11:38 AM, Lee Jones wrote: > > >> +static int mx25_tsadc_setup_irq(struct platform_device *pdev, > >> + struct mx25_tsadc *tsadc) > >> +{ > >> + struct device *dev = &pdev->dev; > >> + struct device_node *np = dev->of_node; > >> + int irq; > >> + > >> + irq = platform_get_irq(pdev, 0); > >> + if (irq < 0) { > > > > What if 0 is returned? > > Then imx25.dtsi would be passing irq=0 for the ADC, which would be > totally wrong. Exactly, so it should be <=. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog