Messages in this thread |  | | | From | Péter Ujfalusi <> | | 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 |
| |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |