Skip to content

Commit 889cfee

Browse files
rfvirgilgregkh
authored andcommitted
ASoC: cs35l56: Use complete_all() to signal init_completion
[ Upstream commit e0bffb6 ] In cs35l56_init() use complete_all() to signal init_completion instead of complete(). cs35l56_init() was signaling init_completion using the complete() function. This only releases ONE waiter. If cs35l56_component_probe() was called multiple times the first time would consume that one signal, then future calls would timeout waiting for the completion. This could happen if: - The component is probed, removed, then probed again without the cs35l56 module being removed. - A call to component_probe() returns an error and ASoC calls it again later. It should use complete_all() so that after it has been signaled it will allow any code that waits on it to continue immediately. The one case where the driver must wait for initialization to run again is when waiting for a reboot after firmware download, and here the code correctly calls reinit_completion() first. Fixes: e496112 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260716132045.1469156-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent c7eb685 commit 889cfee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/soc/codecs/cs35l56.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ int cs35l56_init(struct cs35l56_private *cs35l56)
14411441
return dev_err_probe(cs35l56->base.dev, ret, "Failed to write ASP1_CONTROL3\n");
14421442

14431443
cs35l56->base.init_done = true;
1444-
complete(&cs35l56->init_completion);
1444+
complete_all(&cs35l56->init_completion);
14451445

14461446
return 0;
14471447
}

0 commit comments

Comments
 (0)