Thread (71 messages) 71 messages, 8 authors, 2013-07-27

Re: [PATCH 42/50] media: usb: tlg2300: spin_lock in complete() cleanup

From: Sergei Shtylyov <hidden>
Date: 2013-07-11 13:13:37
Also in: alsa-devel, linux-input, linux-media, linux-wireless

On 11-07-2013 13:06, Ming Lei wrote:

     Subject doesn't match the patch.
Complete() will be run with interrupt enabled, so disable local
interrupt before holding a global lock which is held without
irqsave.

Cc: Mauro Carvalho Chehab <redacted>
Cc: linux-media@vger.kernel.org
Signed-off-by: Ming Lei <redacted>
---
  drivers/media/usb/tlg2300/pd-alsa.c |    3 +++
  1 file changed, 3 insertions(+)
quoted hunk ↗ jump to hunk
diff --git a/drivers/media/usb/tlg2300/pd-alsa.c b/drivers/media/usb/tlg2300/pd-alsa.c
index 3f3e141..cbccc96 100644
--- a/drivers/media/usb/tlg2300/pd-alsa.c
+++ b/drivers/media/usb/tlg2300/pd-alsa.c
[...]
quoted hunk ↗ jump to hunk
@@ -156,6 +157,7 @@ static inline void handle_audio_data(struct urb *urb, int *period_elapsed)
  		memcpy(runtime->dma_area + oldptr * stride, cp, len * stride);

  	/* update the statas */
+	local_irq_save(flags);
  	snd_pcm_stream_lock(pa->capture_pcm_substream);
  	pa->rcv_position	+= len;
  	if (pa->rcv_position >= runtime->buffer_size)
@@ -167,6 +169,7 @@ static inline void handle_audio_data(struct urb *urb, int *period_elapsed)
  		*period_elapsed = 1;
  	}
  	snd_pcm_stream_unlock(pa->capture_pcm_substream);
+	local_irq_restore(flags);
  }
WBR, Sergei

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help