[alsa-devel] [PATCH] ASoC: rt5645: Move irq request to rt5645_probe

Mark Brown broonie at kernel.org
Tue Jul 7 14:55:55 CEST 2015


On Tue, Jun 30, 2015 at 03:30:41PM +0800, Nicolas Boichat wrote:

> rt5645_jack_detect_work (the workqueue called by rt5645_irq),
> needs to access rt5645->codec. However, this field is only
> initialized in rt5645_probe. This can obviously lead to kernel
> panics.

> Fix that by moving the irq request from rt5645_i2c_probe to
> rt5645_probe. Also, fail if the IRQ cannot be requested, and move
> irq_free from rt5645_i2c_remove to rt5645_remove.

No, this is broken - we want to be requesting resources in the device
level probe since it integrates better with things like deferred
probing.  You need to fix the interrupt handler to cope without the
CODEC.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150707/213a6533/attachment.sig>


More information about the Alsa-devel mailing list