mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 07:33:56 +00:00
ASoC: rt5645: Init jack_detect_work before registering irq
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> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
This commit is contained in:
parent
692768c4b2
commit
7ea3470a72
@ -2837,6 +2837,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
|
||||
@ -2855,8 +2857,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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user