[alsa-devel] [PATCH v2 2/5] input: twl6040-vibra: Do not use wrapper for irq request

Péter Ujfalusi peter.ujfalusi at ti.com
Tue Jul 5 16:10:13 CEST 2011


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


More information about the Alsa-devel mailing list