[alsa-devel] [PATCH] Allow passing platform_data to devices attached to AC97 bus
marek.vasut at gmail.com
Wed Jul 22 00:39:00 CEST 2009
Dne St 22. července 2009 00:33:34 Russell King - ARM Linux napsal(a):
> On Wed, Jul 22, 2009 at 12:13:12AM +0200, Marek Vasut wrote:
> > + ret = set_irq_type(gpio_to_irq(pdata->charge_gpio),
> > + IRQ_TYPE_EDGE_BOTH);
> > + if (ret)
> > + goto err2;
> > + ret = request_irq(gpio_to_irq(pdata->charge_gpio),
> > + wm97xx_chrg_irq, IRQF_DISABLED,
> > + "AC Detect", 0);
> This should be done as one call to request_irq().
> If the IRQ is already in use by something else, calling set_irq_type()
> will stamp on that other user, enforcing the change of configuration.
> request_irq() will then fail, leaving the IRQ configuration buggered.
> Combining the two allows request_irq() to fail if the IRQ line is busy.
> If it isn't busy, it will configure the IRQ line prior to enabling the
> IRQ. If the IRQ is shared and sharing is permitted, it will fail if
> the configuration is not compatible with the existing IRQ configuration.
> set_irq_type() should only be used very sparingly and when there's no
> other option.
Sorry, I removed that, this patch should be OK.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8102 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20090722/e4bdbc9a/attachment-0001.patch
More information about the Alsa-devel