]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: cs35l56: Fix flushing of IRQ work in cs35l56_sdw_remove()
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Thu, 21 May 2026 12:30:57 +0000 (13:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jun 2026 15:54:53 +0000 (17:54 +0200)
commitfeec26aecf41b2a9e33b8bb2004cfd700a9b7cf1
tree0336cdfae01a03c9ea5497702924e6cf53023261
parent030f061fbe8383bde0099d14759367f0b74b8d1e
ASoC: cs35l56: Fix flushing of IRQ work in cs35l56_sdw_remove()

[ Upstream commit 18e7bd9f2446664053f8c34b72abd4606d22d858 ]

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: e49611252900 ("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>
sound/soc/codecs/cs35l56-sdw.c