]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-6.6/alsa-hda-cs35l56-set-the-init_done-flag-before-compo.patch
Linux 6.1.85
[thirdparty/kernel/stable-queue.git] / queue-6.6 / alsa-hda-cs35l56-set-the-init_done-flag-before-compo.patch
1 From 9b77fc0a588ce69894b36d88bbf5540d3f796452 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Mon, 25 Mar 2024 14:55:10 +0000
4 Subject: ALSA: hda: cs35l56: Set the init_done flag before component_add()
5
6 From: Simon Trimmer <simont@opensource.cirrus.com>
7
8 [ Upstream commit cafe9c6a72cf1ffe96d2561d988a141cb5c093db ]
9
10 Initialization is completed before adding the component as that can
11 start the process of the device binding and trigger actions that check
12 init_done.
13
14 Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
15 Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
16 Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier")
17 Message-ID: <20240325145510.328378-1-rf@opensource.cirrus.com>
18 Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 Signed-off-by: Sasha Levin <sashal@kernel.org>
20 ---
21 sound/pci/hda/cs35l56_hda.c | 4 ++--
22 1 file changed, 2 insertions(+), 2 deletions(-)
23
24 diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
25 index 7adc1d373d65c..27848d6469636 100644
26 --- a/sound/pci/hda/cs35l56_hda.c
27 +++ b/sound/pci/hda/cs35l56_hda.c
28 @@ -978,14 +978,14 @@ int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int id)
29 pm_runtime_mark_last_busy(cs35l56->base.dev);
30 pm_runtime_enable(cs35l56->base.dev);
31
32 + cs35l56->base.init_done = true;
33 +
34 ret = component_add(cs35l56->base.dev, &cs35l56_hda_comp_ops);
35 if (ret) {
36 dev_err(cs35l56->base.dev, "Register component failed: %d\n", ret);
37 goto pm_err;
38 }
39
40 - cs35l56->base.init_done = true;
41 -
42 return 0;
43
44 pm_err:
45 --
46 2.43.0
47