Re: [PATCH v1 45/49] sound: usb: caiaq: prepare for enabling irq in complete()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Sun, 18 Aug 2013 00:25:10 +0800,
Ming Lei wrote:
> 
> Complete() will be run with interrupt enabled, so change to
> spin_lock_irqsave().
> 
> Cc: Jaroslav Kysela <perex@xxxxxxxx>
> Cc: Takashi Iwai <tiwai@xxxxxxx>

Acked-by: Takashi Iwai <tiwai@suse.e>


thanks,

Takashi


> Cc: alsa-devel@xxxxxxxxxxxxxxxx
> Acked-by: Daniel Mack <zonque@xxxxxxxxx>
> Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxxxxx>
> ---
>  sound/usb/caiaq/audio.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
> index 7103b09..e5675ab 100644
> --- a/sound/usb/caiaq/audio.c
> +++ b/sound/usb/caiaq/audio.c
> @@ -672,10 +672,11 @@ static void read_completed(struct urb *urb)
>  		offset += len;
>  
>  		if (len > 0) {
> -			spin_lock(&cdev->spinlock);
> +			unsigned long flags;
> +			spin_lock_irqsave(&cdev->spinlock, flags);
>  			fill_out_urb(cdev, out, &out->iso_frame_desc[outframe]);
>  			read_in_urb(cdev, urb, &urb->iso_frame_desc[frame]);
> -			spin_unlock(&cdev->spinlock);
> +			spin_unlock_irqrestore(&cdev->spinlock, flags);
>  			check_for_elapsed_periods(cdev, cdev->sub_playback);
>  			check_for_elapsed_periods(cdev, cdev->sub_capture);
>  			send_it = 1;
> -- 
> 1.7.9.5
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux