mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
ASoC: cs35l56: Fix flushing of IRQ work in cs35l56_sdw_remove()
[ Upstream commit18e7bd9f24] Use flush_work() instead of cancel_work_sync() to terminate pending IRQ work in cs35l56_sdw_remove(). And flush_work() again after masking the interrupts to flush any queueing that was racing with the masking. This is the same sequence as cs35l56_sdw_system_suspend(). cs35l56_sdw_interrupt() takes the pm_runtime to prevent the bus powering- down before the interrupt status can be read and handled. The work releases this pm_runtime. So cancelling it, instead of flushing, could leave an unbalanced pm_runtime. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes:e496112529("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Link: https://patch.msgid.link/20260521123057.988732-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d798b25c24
commit
3dee2fe0c8
@@ -524,10 +524,11 @@ static int cs35l56_sdw_remove(struct sdw_slave *peripheral)
|
||||
|
||||
/* Disable SoundWire interrupts */
|
||||
cs35l56->sdw_irq_no_unmask = true;
|
||||
cancel_work_sync(&cs35l56->sdw_irq_work);
|
||||
flush_work(&cs35l56->sdw_irq_work);
|
||||
sdw_write_no_pm(peripheral, CS35L56_SDW_GEN_INT_MASK_1, 0);
|
||||
sdw_read_no_pm(peripheral, CS35L56_SDW_GEN_INT_STAT_1);
|
||||
sdw_write_no_pm(peripheral, CS35L56_SDW_GEN_INT_STAT_1, 0xFF);
|
||||
flush_work(&cs35l56->sdw_irq_work);
|
||||
|
||||
cs35l56_remove(cs35l56);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user