Re: [alsa-devel] [PATCH v2 2/5] input: twl6040-vibra: Do not use wrapper for irq request
5 Jul
2011
5 Jul
'11
4:10 p.m.
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
4919
Age (days ago)
4919
Last active (days ago)
0 comments
1 participants
participants (1)
-
Péter Ujfalusi