@@ -113,6 +113,7 @@ static void em28xx_audio_isocirq(struct urb *urb)
stride = runtime->frame_bits >> 3;
for (i = 0; i < urb->number_of_packets; i++) {
+ unsigned long flags;
int length =
urb->iso_frame_desc[i].actual_length / stride;
cp = (unsigned char *)urb->transfer_buffer +
@@ -134,6 +135,7 @@ static void em28xx_audio_isocirq(struct urb *urb)
length * stride);
}
+ local_irq_save(flags);
snd_pcm_stream_lock(substream);
dev->adev.hwptr_done_capture += length;
@@ -151,6 +153,7 @@ static void em28xx_audio_isocirq(struct urb *urb)
}
snd_pcm_stream_unlock(substream);
+ local_irq_restore(flags);
}
if (period_elapsed)
snd_pcm_period_elapsed(substream);
Complete() will be run with interrupt enabled, so add local_irq_save() before acquiring the lock without irqsave(). Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: linux-media@vger.kernel.org Signed-off-by: Ming Lei <ming.lei@canonical.com> --- drivers/media/usb/em28xx/em28xx-audio.c | 3 +++ 1 file changed, 3 insertions(+)