ASoC: cs35l56: Remove quick-cancelling of dsp_work()
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 11 Apr 2023 15:25:23 +0000 (16:25 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 12 Apr 2023 16:34:35 +0000 (17:34 +0100)
commit39a594dc0b4ac949edf221db33c7061c45e2c90b
tree9552ecfbdb7610ec697c9fd27def236db49f6feb
parentf9dc6b875ec0a6a6d4091cd9603d193ec98c75a2
ASoC: cs35l56: Remove quick-cancelling of dsp_work()

Delete the 'removing' flag and don't kick init_completion to make a
quick cancel of dsp_work(). Just let it timeout on the wait for the
completion.

Simplify the code to standard cancelling or flushing of the work.
This avoids introducing corner cases from a layer of custom signalling.
It also avoids potential race conditions when system-suspend handling
is added.

Unless the hardware is broken, the dsp_work() will already have started
and passed the completion before the driver would want to cancel it.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/168122674746.26.16881587647873355224@mailman-core.alsa-project.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l56.c
sound/soc/codecs/cs35l56.h