Skip to content

Commit

Permalink
ASoC: rt5682-sdw: fix locking sequence
Browse files Browse the repository at this point in the history
[ Upstream commit 310a5ca ]

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 <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-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
plbossart authored and gregkh committed Apr 10, 2024
1 parent cc4d9f0 commit 8eea5ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/rt5682-sdw.c
Expand Up @@ -763,12 +763,12 @@ static int __maybe_unused rt5682_dev_resume(struct device *dev)
return 0;

if (!slave->unattach_request) {
mutex_lock(&rt5682->disable_irq_lock);
if (rt5682->disable_irq == true) {
mutex_lock(&rt5682->disable_irq_lock);
sdw_write_no_pm(slave, SDW_SCP_INTMASK1, SDW_SCP_INT1_IMPL_DEF);
rt5682->disable_irq = false;
mutex_unlock(&rt5682->disable_irq_lock);
}
mutex_unlock(&rt5682->disable_irq_lock);
goto regmap_sync;
}

Expand Down

0 comments on commit 8eea5ae

Please sign in to comment.