mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
ASoC: rt711-sdw: fix locking sequence
[ Upstream commitaae86cfd87
] The disable_irq_lock protects the 'disable_irq' value, we need to lock before testing it. Fixes:b69de265bd
("ASoC: rt711: 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-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
53c8045621
commit
3bfbc530a6
1 changed files with 2 additions and 2 deletions
|
@ -536,12 +536,12 @@ static int __maybe_unused rt711_dev_resume(struct device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!slave->unattach_request) {
|
if (!slave->unattach_request) {
|
||||||
if (rt711->disable_irq == true) {
|
|
||||||
mutex_lock(&rt711->disable_irq_lock);
|
mutex_lock(&rt711->disable_irq_lock);
|
||||||
|
if (rt711->disable_irq == true) {
|
||||||
sdw_write_no_pm(slave, SDW_SCP_INTMASK1, SDW_SCP_INT1_IMPL_DEF);
|
sdw_write_no_pm(slave, SDW_SCP_INTMASK1, SDW_SCP_INT1_IMPL_DEF);
|
||||||
rt711->disable_irq = false;
|
rt711->disable_irq = false;
|
||||||
mutex_unlock(&rt711->disable_irq_lock);
|
|
||||||
}
|
}
|
||||||
|
mutex_unlock(&rt711->disable_irq_lock);
|
||||||
goto regmap_sync;
|
goto regmap_sync;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue