From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Subject: Re: [PATCH 1/3] ASoC: Add GPIO support for jack reporting interface Date: Thu, 26 Feb 2009 10:52:10 -0800 Message-ID: <200902261052.10647.david-b@pacbell.net> References: <2C7D3DF36ADFFC479B44490D912B616705EC8B1C03@dlee07.ent.ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from smtp118.sbc.mail.sp1.yahoo.com (smtp118.sbc.mail.sp1.yahoo.com [69.147.64.91]) by alsa0.perex.cz (Postfix) with SMTP id C761A1037F3 for ; Thu, 26 Feb 2009 19:52:13 +0100 (CET) In-Reply-To: <2C7D3DF36ADFFC479B44490D912B616705EC8B1C03@dlee07.ent.ti.com> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: "Lopez Cruz, Misael" Cc: "alsa-devel@alsa-project.org" , "linux-omap@vger.kernel.org" List-Id: alsa-devel@alsa-project.org On Wednesday 25 February 2009, Lopez Cruz, Misael wrote: > +=A0=A0=A0=A0=A0=A0=A0unsigned int gpio; Use "int" not unsigned for such might-be-a-GPIO codes ... > +=A0=A0=A0=A0=A0=A0=A0unsigned int irq; > +=A0=A0=A0=A0=A0=A0=A0unsigned long irqflags; > +=A0=A0=A0=A0=A0=A0=A0irq_handler_t handler; > +=A0=A0=A0=A0=A0=A0=A0struct work_struct work; > =A0}; > =A0 > +#define NO_JACK_PIN_GPIO=A0=A0=A0=A0=A0=A0=A0UINT_MAX And any negative number to flag "no GPIO"; "-EINVAL" for example. > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (pins[i].gpio !=3D NO_JA= CK_PIN_GPIO) { Make that: if (gpio_is_valid(pins[i].gpio)) ...