X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fbrcm2708%2Fpatches-4.19%2F950-0406-staging-bcm2835-audio-Drop-superfluous-mutex-lock-du.patch;fp=target%2Flinux%2Fbrcm2708%2Fpatches-4.19%2F950-0406-staging-bcm2835-audio-Drop-superfluous-mutex-lock-du.patch;h=a70081159f2521ceceed93b62708dd97202ba1cd;hb=67dcc43f3a22dc3a7ac07a7065971b426feeb043;hp=0000000000000000000000000000000000000000;hpb=47a93a810f78adce5a130d287f82b28e9b54313c;p=openwrt%2Fstaging%2Fwigyori.git diff --git a/target/linux/brcm2708/patches-4.19/950-0406-staging-bcm2835-audio-Drop-superfluous-mutex-lock-du.patch b/target/linux/brcm2708/patches-4.19/950-0406-staging-bcm2835-audio-Drop-superfluous-mutex-lock-du.patch new file mode 100644 index 0000000000..a70081159f --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0406-staging-bcm2835-audio-Drop-superfluous-mutex-lock-du.patch @@ -0,0 +1,49 @@ +From 3c7663a9b1763f64250db4b975a3ce246ef32e0f Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 4 Sep 2018 17:58:45 +0200 +Subject: [PATCH] staging: bcm2835-audio: Drop superfluous mutex lock + during prepare + +commit f0eb15d055380ff127e5f12c8fad2b36bdb3c006 upstream. + +The chip->audio_mutex is used basically for protecting the opened +stream assignment, and the prepare callback is irrelevant with it. + +Signed-off-by: Takashi Iwai +Tested-by: Stefan Wahren +Signed-off-by: Greg Kroah-Hartman +--- + drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c ++++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c +@@ -218,8 +218,6 @@ static int snd_bcm2835_pcm_prepare(struc + int channels; + int err; + +- mutex_lock(&chip->audio_mutex); +- + /* notify the vchiq that it should enter spdif passthrough mode by + * setting channels=0 (see + * https://github.com/raspberrypi/linux/issues/528) +@@ -233,7 +231,7 @@ static int snd_bcm2835_pcm_prepare(struc + runtime->rate, + snd_pcm_format_width(runtime->format)); + if (err < 0) +- goto out; ++ return err; + + memset(&alsa_stream->pcm_indirect, 0, sizeof(alsa_stream->pcm_indirect)); + +@@ -246,9 +244,7 @@ static int snd_bcm2835_pcm_prepare(struc + alsa_stream->pos = 0; + alsa_stream->draining = false; + +- out: +- mutex_unlock(&chip->audio_mutex); +- return err; ++ return 0; + } + + static void snd_bcm2835_pcm_transfer(struct snd_pcm_substream *substream,