Skip to content

Commit

Permalink
ALSA: x86: Fix missing spinlock and mutex initializations
Browse files Browse the repository at this point in the history
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: b4eb0d5 ("ALSA: x86: Split snd_intelhad into card and PCM specific structures")
Cc: <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Feb 28, 2018
1 parent 5a23699 commit 3501440
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/x86/intel_hdmi_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1835,6 +1835,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
ctx->port = single_port ? -1 : 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,
Expand Down

0 comments on commit 3501440

Please sign in to comment.