public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@ti.com>
To: "Balbi, Felipe" <balbi@ti.com>
Cc: "Girdwood, Liam" <lrg@ti.com>, Tony Lindgren <tony@atomide.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"Lopez Cruz, Misael" <misael.lopez@ti.com>
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	[thread overview]
Message-ID: <1462382.yEDobJovyP@barack> (raw)
In-Reply-To: <20110705135745.GN2820@legolas.emea.dhcp.ti.com>

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

  reply	other threads:[~2011-07-05 14:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05 13:49 [PATCH v2 0/5] MFD/input/ASoC: twl6040: irq registration changes Peter Ujfalusi
2011-07-05 13:49 ` [PATCH v2 1/5] MFD: twl6040: Use resource to provide irq number for slaves Peter Ujfalusi
2011-07-05 13:49 ` [PATCH v2 2/5] input: twl6040-vibra: Do not use wrapper for irq request Peter Ujfalusi
2011-07-05 13:57   ` Felipe Balbi
2011-07-05 14:10     ` Péter Ujfalusi [this message]
2011-07-05 13:49 ` [PATCH v2 3/5] ASoC: twl6040: " Peter Ujfalusi
2011-07-05 17:59   ` Mark Brown
2011-07-05 22:38     ` Felipe Balbi
2011-07-05 13:49 ` [PATCH v2 4/5] MFD: twl6040: Demand valid interrupt configuration Peter Ujfalusi
2011-07-05 13:49 ` [PATCH v2 5/5] MFD: twl6040: Remove wrapper for threaded irq request Peter Ujfalusi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462382.yEDobJovyP@barack \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=balbi@ti.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=misael.lopez@ti.com \
    --cc=sameo@linux.intel.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox