]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ALSA: x86: Fix missing spinlock and mutex initializations
authorTakashi Iwai <tiwai@suse.de>
Wed, 28 Feb 2018 07:36:06 +0000 (08:36 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 15 Mar 2018 13:27:30 +0000 (08:27 -0500)
BugLink: http://bugs.launchpad.net/bugs/1755179
commit 350144069abf351c743d766b2fba9cb9b7cd32a1 upstream.

The commit change for supporting the multiple ports moved involved
some code shuffling, and there the initializations of spinlock and
mutex in snd_intelhad object were dropped mistakenly.

This patch adds the missing initializations again for each port.

Fixes: b4eb0d522fcb ("ALSA: x86: Split snd_intelhad into card and PCM specific structures")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
sound/x86/intel_hdmi_audio.c

index a0951505c7f5b2804c3203fe7eeb0dea7d4935b1..697872d8308e20e9cf3b3971dd305f149299de39 100644 (file)
@@ -1827,6 +1827,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
                ctx->port = port;
                ctx->pipe = -1;
 
+               spin_lock_init(&ctx->had_spinlock);
+               mutex_init(&ctx->mutex);
                INIT_WORK(&ctx->hdmi_audio_wq, had_audio_wq);
 
                ret = snd_pcm_new(card, INTEL_HAD, port, MAX_PB_STREAMS,