Skip to content
Commit f2a5ded3 authored by Nicolas Boichat's avatar Nicolas Boichat Committed by Mark Brown
Browse files

ASoC: rt5645: Check if codec is initialized in workqueue handler



This fixes kernel panic on boot, if rt5645->codec is NULL when
rt5645_jack_detect_work is first called.

rt5645_jack_detect_work needs rt5645->codec to be initialized to setup
dapm pins. Also, reporting jack events is useless, as the jacks cannot
be set before the codec is ready.

Since we manually call the interrupt handler in
rt5645_set_jack_detect, the initial jack state will be reported
correctly, and dapm pins will be setup at that time.

Signed-off-by: default avatarNicolas Boichat <drinkcat@chromium.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d770e558
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment