* [PATCH] ASoC: rt5645: Init jack_detect_work before registering irq
@ 2015-06-05 10:42 Nicolas Boichat
2015-06-05 17:15 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Boichat @ 2015-06-05 10:42 UTC (permalink / raw)
To: Mark Brown
Cc: Oder Chiou, alsa-devel, Takashi Iwai, Liam Girdwood, koro.chen,
Bard Liao
Prevents frequent panic on boot, if the irq handler rt5645_irq
gets called before the workqueue rt5645_jack_detect_work is
initialized.
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
---
Applies on top of broonie/sound.git/for-next (dac48b88824392de29a437607b7dbf844bb66f74)
sound/soc/codecs/rt5645.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index e9544c6..d5f0f56 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3416,6 +3416,8 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
}
}
+ INIT_DELAYED_WORK(&rt5645->jack_detect_work, rt5645_jack_detect_work);
+
if (rt5645->i2c->irq) {
ret = request_threaded_irq(rt5645->i2c->irq, NULL, rt5645_irq,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING
@@ -3434,8 +3436,6 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
dev_err(&i2c->dev, "Fail gpio_direction hp_det_gpio\n");
}
- INIT_DELAYED_WORK(&rt5645->jack_detect_work, rt5645_jack_detect_work);
-
return snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt5645,
rt5645_dai, ARRAY_SIZE(rt5645_dai));
}
--
2.2.0.rc0.207.ga3a616c
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: rt5645: Init jack_detect_work before registering irq
2015-06-05 10:42 [PATCH] ASoC: rt5645: Init jack_detect_work before registering irq Nicolas Boichat
@ 2015-06-05 17:15 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2015-06-05 17:15 UTC (permalink / raw)
To: Nicolas Boichat
Cc: Oder Chiou, alsa-devel, Takashi Iwai, Liam Girdwood, koro.chen,
Bard Liao
[-- Attachment #1.1: Type: text/plain, Size: 225 bytes --]
On Fri, Jun 05, 2015 at 06:42:12PM +0800, Nicolas Boichat wrote:
> Prevents frequent panic on boot, if the irq handler rt5645_irq
> gets called before the workqueue rt5645_jack_detect_work is
> initialized.
Applied, thanks.
[-- 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] 2+ messages in thread
end of thread, other threads:[~2015-06-05 17:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-05 10:42 [PATCH] ASoC: rt5645: Init jack_detect_work before registering irq Nicolas Boichat
2015-06-05 17:15 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.