diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-28 21:48:16 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-28 21:48:16 +0100 |
commit | d4ab5487cc77a4053dc9070c5761ad94bf397825 (patch) | |
tree | cd69e85b7cc3f45f10c3cf402c8a497be8da3944 /sound/soc/codecs/rt5682s.c | |
parent | tty: Reserve ldisc 29 for development purposes (diff) | |
parent | Linux 5.17-rc6 (diff) | |
download | linux-d4ab5487cc77a4053dc9070c5761ad94bf397825.tar.xz linux-d4ab5487cc77a4053dc9070c5761ad94bf397825.zip |
Merge 5.17-rc6 into tty-next
We need the tty/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/soc/codecs/rt5682s.c')
-rw-r--r-- | sound/soc/codecs/rt5682s.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/soc/codecs/rt5682s.c b/sound/soc/codecs/rt5682s.c index efa1016831dd..1e662d1be2b3 100644 --- a/sound/soc/codecs/rt5682s.c +++ b/sound/soc/codecs/rt5682s.c @@ -824,11 +824,13 @@ static void rt5682s_jack_detect_handler(struct work_struct *work) container_of(work, struct rt5682s_priv, jack_detect_work.work); int val, btn_type; - while (!rt5682s->component) - usleep_range(10000, 15000); - - while (!rt5682s->component->card->instantiated) - usleep_range(10000, 15000); + if (!rt5682s->component || !rt5682s->component->card || + !rt5682s->component->card->instantiated) { + /* card not yet ready, try later */ + mod_delayed_work(system_power_efficient_wq, + &rt5682s->jack_detect_work, msecs_to_jiffies(15)); + return; + } mutex_lock(&rt5682s->jdet_mutex); mutex_lock(&rt5682s->calibrate_mutex); |