ASoC: hdmi-codec: remove reference to the current substream
authorJerome Brunet <jbrunet@baylibre.com>
Mon, 6 May 2019 09:58:13 +0000 (11:58 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 8 May 2019 08:15:38 +0000 (17:15 +0900)
commit3fcf94ef4d418668fa66e33ce9aabb05689b55f6
tree21038f534001f7175475b5e2383eda5aeaf88f5d
parent900e5daf7034cf65ce4072b86f297c42f9042433
ASoC: hdmi-codec: remove reference to the current substream

If the hdmi-codec is on a codec-to-codec link, the substream pointer
it receives is completely made up by snd_soc_dai_link_event().
The pointer will be different between startup() and shutdown().

The hdmi-codec complains when this happens even if it is not really a
problem. The current_substream pointer is not used for anything useful
apart from getting the exclusive ownership of the device.

Remove current_substream pointer and replace the exclusive locking
mechanism with a simple variable and some atomic operations.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/hdmi-codec.c