[ALSA] pcsp: locking fix
[firefly-linux-kernel-4.4.55.git] / sound / drivers / pcsp / pcsp_lib.c
index a302756eac7caaf301f4e99fa9fa02a5d0920e15..54253e9b4b02882cad3fd1a812363d5c47b98302 100644 (file)
@@ -305,7 +305,9 @@ static int snd_pcsp_playback_open(struct snd_pcm_substream *substream)
                return -EBUSY;
        }
        runtime->hw = snd_pcsp_playback;
+       spin_lock_irq(&chip->substream_lock);
        chip->playback_substream = substream;
+       spin_unlock_irq(&chip->substream_lock);
        return 0;
 }