aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_sysfs.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-12-09 16:01:19 +0100
committerTakashi Iwai <tiwai@suse.de>2020-12-10 19:55:35 +0100
commit2506318e382c4c7daa77bdc48f80a0ee82804588 (patch)
tree462af021009189a1472d303d6647975e40fcb76b /sound/pci/hda/hda_sysfs.c
parentALSA: hda/proc - print DP-MST connections (diff)
downloadlinux-dev-2506318e382c4c7daa77bdc48f80a0ee82804588.tar.xz
linux-dev-2506318e382c4c7daa77bdc48f80a0ee82804588.zip
ALSA: hda: Fix regressions on clear and reconfig sysfs
It seems that the HD-audio clear and reconfig sysfs don't work any longer after the recent driver core change. There are multiple issues around that: the linked list corruption and the dead device handling. The former issue is fixed by another patch for the driver core itself, while the latter patch needs to be addressed in HD-audio side. This patch corresponds to the latter, it recovers those broken functions by replacing the device detach and attach actions with the standard core API functions, which are almost equivalent with unbind and bind actions. Fixes: 654888327e9f ("driver core: Avoid binding drivers to dead devices") Cc: <stable@vger.kernel.org> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=209207 Link: https://lore.kernel.org/r/20201209150119.7705-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_sysfs.c')
-rw-r--r--sound/pci/hda/hda_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_sysfs.c b/sound/pci/hda/hda_sysfs.c
index eb8ec109d7ad..d5ffcba794e5 100644
--- a/sound/pci/hda/hda_sysfs.c
+++ b/sound/pci/hda/hda_sysfs.c
@@ -139,7 +139,7 @@ static int reconfig_codec(struct hda_codec *codec)
"The codec is being used, can't reconfigure.\n");
goto error;
}
- err = snd_hda_codec_configure(codec);
+ err = device_reprobe(hda_codec_dev(codec));
if (err < 0)
goto error;
err = snd_card_register(codec->card);