Skip to content

Commit

Permalink
ASoC: rt722-sdca-sdw: fix locking sequence
Browse files Browse the repository at this point in the history
The disable_irq_lock protects the 'disable_irq' value, we need to lock
before testing it.

Fixes: a0b7c59 ("ASoC: rt722-sdca: fix for JD event handling in ClockStop Mode0")
Signed-off-by: Pierre-Louis Bossart <[email protected]>
  • Loading branch information
plbossart committed Jan 17, 2024
1 parent 27518a0 commit 9d73402
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/rt722-sdca-sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,13 +467,13 @@ static int __maybe_unused rt722_sdca_dev_resume(struct device *dev)
return 0;

if (!slave->unattach_request) {
mutex_lock(&rt722->disable_irq_lock);
if (rt722->disable_irq == true) {
mutex_lock(&rt722->disable_irq_lock);
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_6);
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8);
rt722->disable_irq = false;
mutex_unlock(&rt722->disable_irq_lock);
}
mutex_unlock(&rt722->disable_irq_lock);
goto regmap_sync;
}

Expand Down

0 comments on commit 9d73402

Please sign in to comment.