Skip to content

Commit ee28777

Browse files
plbossartbroonie
authored andcommitted
ASoC: rt711-sdca: fix locking sequence
The disable_irq_lock protects the 'disable_irq' value, we need to lock before testing it. Fixes: 23adeb7 ("ASoC: rt711-sdca: 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 310a5ca commit ee28777

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/codecs/rt711-sdca-sdw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,13 @@ static int __maybe_unused rt711_sdca_dev_resume(struct device *dev)
438438
return 0;
439439

440440
if (!slave->unattach_request) {
441+
mutex_lock(&rt711->disable_irq_lock);
441442
if (rt711->disable_irq == true) {
442-
mutex_lock(&rt711->disable_irq_lock);
443443
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_0);
444444
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8);
445445
rt711->disable_irq = false;
446-
mutex_unlock(&rt711->disable_irq_lock);
447446
}
447+
mutex_unlock(&rt711->disable_irq_lock);
448448
goto regmap_sync;
449449
}
450450

0 commit comments

Comments
 (0)