Skip to content

Commit 310a5ca

Browse files
plbossartbroonie
authored andcommitted
ASoC: rt5682-sdw: fix locking sequence
The disable_irq_lock protects the 'disable_irq' value, we need to lock before testing it. Fixes: 02fb23d ("ASoC: rt5682-sdw: fix for JD event handling in ClockStop Mode0") Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Chao Song <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 3849c4d commit 310a5ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/codecs/rt5682-sdw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,12 +763,12 @@ static int __maybe_unused rt5682_dev_resume(struct device *dev)
763763
return 0;
764764

765765
if (!slave->unattach_request) {
766+
mutex_lock(&rt5682->disable_irq_lock);
766767
if (rt5682->disable_irq == true) {
767-
mutex_lock(&rt5682->disable_irq_lock);
768768
sdw_write_no_pm(slave, SDW_SCP_INTMASK1, SDW_SCP_INT1_IMPL_DEF);
769769
rt5682->disable_irq = false;
770-
mutex_unlock(&rt5682->disable_irq_lock);
771770
}
771+
mutex_unlock(&rt5682->disable_irq_lock);
772772
goto regmap_sync;
773773
}
774774

0 commit comments

Comments
 (0)