Skip to content

Commit c8b2e5c

Browse files
plbossartbroonie
authored andcommitted
ASoC: rt712-sdca-sdw: fix locking sequence
The disable_irq_lock protects the 'disable_irq' value, we need to lock before testing it. Fixes: 7a8735c ("ASoC: rt712-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 aae86cf commit c8b2e5c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

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

440440
if (!slave->unattach_request) {
441+
mutex_lock(&rt712->disable_irq_lock);
441442
if (rt712->disable_irq == true) {
442-
mutex_lock(&rt712->disable_irq_lock);
443+
443444
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_0);
444445
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8);
445446
rt712->disable_irq = false;
446-
mutex_unlock(&rt712->disable_irq_lock);
447447
}
448+
mutex_unlock(&rt712->disable_irq_lock);
448449
goto regmap_sync;
449450
}
450451

0 commit comments

Comments
 (0)