* [PATCH] ASoC: max98090: Fix missing free_irq (part 2)
@ 2014-09-18 10:48 Jarkko Nikula
2014-09-18 17:54 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Nikula @ 2014-09-18 10:48 UTC (permalink / raw)
To: alsa-devel; +Cc: Mark Brown, Jarkko Nikula, Liam Girdwood
I was blind to see interrupt was requested in codec probe instead of i2c
probe when doing commit 4adeb0ccf86a ("ASoC: max98090: Fix missing free_irq")
and there is still a case where interrupt is kept requested. Although not as
fatal as original issue.
Since codec can be reprobed while driver is loaded the subsequent
max98090_probe() call will fail in interrupt request since it wasn't freed.
Fix this by explicitly freeing irq in max98090_remove().
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
for-next, I don't think this is critical enough for stable.
---
sound/soc/codecs/max98090.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index f1543653a699..ccc1466c0440 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -2413,6 +2413,7 @@ static int max98090_remove(struct snd_soc_codec *codec)
{
struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec);
+ devm_free_irq(codec->dev, max98090->irq, codec);
cancel_delayed_work_sync(&max98090->jack_work);
cancel_delayed_work_sync(&max98090->pll_det_enable_work);
cancel_work_sync(&max98090->pll_det_disable_work);
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: max98090: Fix missing free_irq (part 2)
2014-09-18 10:48 [PATCH] ASoC: max98090: Fix missing free_irq (part 2) Jarkko Nikula
@ 2014-09-18 17:54 ` Mark Brown
2014-09-19 7:51 ` Jarkko Nikula
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2014-09-18 17:54 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 485 bytes --]
On Thu, Sep 18, 2014 at 01:48:44PM +0300, Jarkko Nikula wrote:
> ---
> for-next, I don't think this is critical enough for stable.
> ---
> @@ -2413,6 +2413,7 @@ static int max98090_remove(struct snd_soc_codec *codec)
> {
> struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec);
>
> + devm_free_irq(codec->dev, max98090->irq, codec);
If this is a fix for -next shouldn't we be doing the proper fix and
moving the resource acquisition to the bus probe?
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: max98090: Fix missing free_irq (part 2)
2014-09-18 17:54 ` Mark Brown
@ 2014-09-19 7:51 ` Jarkko Nikula
0 siblings, 0 replies; 3+ messages in thread
From: Jarkko Nikula @ 2014-09-19 7:51 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Liam Girdwood
On 09/18/2014 08:54 PM, Mark Brown wrote:
> On Thu, Sep 18, 2014 at 01:48:44PM +0300, Jarkko Nikula wrote:
>
>> ---
>> for-next, I don't think this is critical enough for stable.
>> ---
>> @@ -2413,6 +2413,7 @@ static int max98090_remove(struct snd_soc_codec *codec)
>> {
>> struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec);
>>
>> + devm_free_irq(codec->dev, max98090->irq, codec);
> If this is a fix for -next shouldn't we be doing the proper fix and
> moving the resource acquisition to the bus probe?
Fair enough. I'll cook another version.
--
Jarkko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-19 7:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-18 10:48 [PATCH] ASoC: max98090: Fix missing free_irq (part 2) Jarkko Nikula
2014-09-18 17:54 ` Mark Brown
2014-09-19 7:51 ` Jarkko Nikula
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).