From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752593Ab1GEOKY (ORCPT ); Tue, 5 Jul 2011 10:10:24 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:39754 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752349Ab1GEOKX convert rfc822-to-8bit (ORCPT ); Tue, 5 Jul 2011 10:10:23 -0400 From: =?ISO-8859-1?Q?P=E9ter?= Ujfalusi To: "Balbi, Felipe" CC: "Girdwood, Liam" , Tony Lindgren , Mark Brown , Samuel Ortiz , Dmitry Torokhov , "linux-kernel@vger.kernel.org" , "alsa-devel@alsa-project.org" , "Lopez Cruz, Misael" Subject: Re: Re: [PATCH v2 2/5] input: twl6040-vibra: Do not use wrapper for irq request Date: Tue, 5 Jul 2011 17:10:13 +0300 Message-ID: <1462382.yEDobJovyP@barack> User-Agent: KMail/4.6.0 (Linux/2.6.39-gentoo; KDE/4.6.4; x86_64; ; ) In-Reply-To: <20110705135745.GN2820@legolas.emea.dhcp.ti.com> References: <1309873775-17927-1-git-send-email-peter.ujfalusi@ti.com> <1309873775-17927-3-git-send-email-peter.ujfalusi@ti.com> <20110705135745.GN2820@legolas.emea.dhcp.ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="ISO-8859-1" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 05 July 2011 15:57:46 Balbi, Felipe wrote: > > + info->irq = platform_get_irq(pdev, 0); > > + if (!info->irq) { > > this is wrong. platform_get_irq() will return -ENXIO if it can't find > the IRQ you requested: > > 55 /** > 56 * platform_get_irq - get an IRQ for a device > 57 * @dev: platform device > 58 * @num: IRQ number index > 59 */ > 60 int platform_get_irq(struct platform_device *dev, unsigned int num) > 61 { > 62 struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, > num); 63 > 64 return r ? r->start : -ENXIO; > 65 } > 66 EXPORT_SYMBOL_GPL(platform_get_irq); Yes, I have not checked that.. Will replace the check with (info->irq< 0) checks in both slaves. Thanks for noticing it! I'll wait a bit for other comments, and will resend. -- Péter From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?P=E9ter?= Ujfalusi Subject: Re: [PATCH v2 2/5] input: twl6040-vibra: Do not use wrapper for irq request Date: Tue, 5 Jul 2011 17:10:13 +0300 Message-ID: <1462382.yEDobJovyP@barack> References: <1309873775-17927-1-git-send-email-peter.ujfalusi@ti.com> <1309873775-17927-3-git-send-email-peter.ujfalusi@ti.com> <20110705135745.GN2820@legolas.emea.dhcp.ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by alsa0.perex.cz (Postfix) with ESMTP id 3BE0D24369 for ; Tue, 5 Jul 2011 16:10:18 +0200 (CEST) In-Reply-To: <20110705135745.GN2820@legolas.emea.dhcp.ti.com> 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: "Balbi, Felipe" Cc: "alsa-devel@alsa-project.org" , Dmitry Torokhov , Samuel Ortiz , Tony Lindgren , Mark Brown , "linux-kernel@vger.kernel.org" , "Lopez Cruz, Misael" , "Girdwood, Liam" List-Id: alsa-devel@alsa-project.org On Tuesday 05 July 2011 15:57:46 Balbi, Felipe wrote: > > + info->irq =3D platform_get_irq(pdev, 0); > > + if (!info->irq) { > = > this is wrong. platform_get_irq() will return -ENXIO if it can't find > the IRQ you requested: > = > 55 /** > 56 * platform_get_irq - get an IRQ for a device > 57 * @dev: platform device > 58 * @num: IRQ number index > 59 */ > 60 int platform_get_irq(struct platform_device *dev, unsigned int num) > 61 { > 62 struct resource *r =3D platform_get_resource(dev, IORESOURCE= _IRQ, > num); 63 > 64 return r ? r->start : -ENXIO; > 65 } > 66 EXPORT_SYMBOL_GPL(platform_get_irq); Yes, I have not checked that.. Will replace the check with (info->irq< 0) checks in both slaves. Thanks for noticing it! I'll wait a bit for other comments, and will resend. -- = P=E9ter