On Sat 17 August 2013 18:25:08 Ming Lei wrote:
> Complete() will be run with interrupt enabled, so add local_irq_save()
> before acquiring the lock without irqsave().
> 
> Cc: Mauro Carvalho Chehab <mche...@redhat.com>
> Cc: linux-me...@vger.kernel.org
> Signed-off-by: Ming Lei <ming....@canonical.com>

Acked-by: Hans Verkuil <hans.verk...@cisco.com>

Regards,

        Hans

> ---
>  drivers/media/usb/em28xx/em28xx-audio.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/usb/em28xx/em28xx-audio.c 
> b/drivers/media/usb/em28xx/em28xx-audio.c
> index 2fdb66e..7fd1b2a 100644
> --- a/drivers/media/usb/em28xx/em28xx-audio.c
> +++ b/drivers/media/usb/em28xx/em28xx-audio.c
> @@ -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,7 +135,7 @@ static void em28xx_audio_isocirq(struct urb *urb)
>                                      length * stride);
>                       }
>  
> -                     snd_pcm_stream_lock(substream);
> +                     snd_pcm_stream_lock_irqsave(substream, flags);
>  
>                       dev->adev.hwptr_done_capture += length;
>                       if (dev->adev.hwptr_done_capture >=
> @@ -150,7 +151,7 @@ static void em28xx_audio_isocirq(struct urb *urb)
>                               period_elapsed = 1;
>                       }
>  
> -                     snd_pcm_stream_unlock(substream);
> +                     snd_pcm_stream_unlock_irqrestore(substream, flags);
>               }
>               if (period_elapsed)
>                       snd_pcm_period_elapsed(substream);
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to