summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2024-05-08 11:03:47 +0100
committerTakashi Iwai <tiwai@suse.de>2024-05-08 18:18:23 +0200
commitec6f32bc924d1c00cbcd5672510758f7088f2513 (patch)
tree89f1d42892a7679f7e89dde38d8f14d405b8f0dd /sound/pci/hda/patch_realtek.c
parent172811e3a557d8681a5e2d0f871dc04a2d17eb13 (diff)
downloadlinux-ec6f32bc924d1c00cbcd5672510758f7088f2513.tar.gz
linux-ec6f32bc924d1c00cbcd5672510758f7088f2513.tar.bz2
linux-ec6f32bc924d1c00cbcd5672510758f7088f2513.zip
ALSA: hda: hda_component: Initialize shared data during bind callback
Move the initialization of the shared struct hda_component array into hda_component_manager_bind(). The purpose of the manager bind() callback is to allow it to perform initialization before binding in the component drivers. This is the correct place to initialize the shared data. The original implementation initialized the shared data in hda_component_manager_init(). This is only done once during probe() of the manager driver. So if the component binding was unbound and then rebound, the shared data would not be re-initialized. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: fd895a74dc1d ("ALSA: hda: realtek: Move hda_component implementation to module") Link: https://lore.kernel.org/r/20240508100347.47283-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 8c157158f1cb..8c39bbdc6c5e 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6785,7 +6785,7 @@ static int comp_bind(struct device *dev)
struct alc_spec *spec = cdc->spec;
int ret;
- ret = hda_component_manager_bind(cdc, spec->comps);
+ ret = hda_component_manager_bind(cdc, spec->comps, ARRAY_SIZE(spec->comps));
if (ret)
return ret;