diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2024-03-25 17:18:13 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-03-28 19:31:08 +0000 |
commit | ee287771644394d071e6a331951ee8079b64f9a7 (patch) | |
tree | 5849df3f5ccb475c5d9e24c5909d783cdc540a5d | |
parent | 310a5caa4e861616a27a83c3e8bda17d65026fa8 (diff) | |
download | lwn-ee287771644394d071e6a331951ee8079b64f9a7.tar.gz lwn-ee287771644394d071e6a331951ee8079b64f9a7.zip |
ASoC: rt711-sdca: fix locking sequence
The disable_irq_lock protects the 'disable_irq' value, we need to lock
before testing it.
Fixes: 23adeb7056ac ("ASoC: rt711-sdca: fix for JD event handling in ClockStop Mode0")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Chao Song <chao.song@linux.intel.com>
Link: https://msgid.link/r/20240325221817.206465-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/rt711-sdca-sdw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt711-sdca-sdw.c b/sound/soc/codecs/rt711-sdca-sdw.c index 935e597022d3..b8471b2d8f4f 100644 --- a/sound/soc/codecs/rt711-sdca-sdw.c +++ b/sound/soc/codecs/rt711-sdca-sdw.c @@ -438,13 +438,13 @@ static int __maybe_unused rt711_sdca_dev_resume(struct device *dev) return 0; if (!slave->unattach_request) { + mutex_lock(&rt711->disable_irq_lock); if (rt711->disable_irq == true) { - mutex_lock(&rt711->disable_irq_lock); sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_0); sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8); rt711->disable_irq = false; - mutex_unlock(&rt711->disable_irq_lock); } + mutex_unlock(&rt711->disable_irq_lock); goto regmap_sync; } |