Return-path: Received: from mail-pa0-f49.google.com ([209.85.220.49]:50015 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932451Ab3GKJLu (ORCPT ); Thu, 11 Jul 2013 05:11:50 -0400 From: Ming Lei To: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, Oliver Neukum , Alan Stern , linux-input@vger.kernel.org, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-media@vger.kernel.org, alsa-devel@alsa-project.org, Ming Lei , Mauro Carvalho Chehab Subject: [PATCH 39/50] media: usb: tm6000: spin_lock in complete() cleanup Date: Thu, 11 Jul 2013 17:06:02 +0800 Message-Id: <1373533573-12272-40-git-send-email-ming.lei@canonical.com> (sfid-20130711_111200_550723_3AF5AD8A) In-Reply-To: <1373533573-12272-1-git-send-email-ming.lei@canonical.com> References: <1373533573-12272-1-git-send-email-ming.lei@canonical.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Signed-off-by: Ming Lei --- drivers/media/usb/tm6000/tm6000-video.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index cc1aa14..8bb440f 100644 --- a/drivers/media/usb/tm6000/tm6000-video.c +++ b/drivers/media/usb/tm6000/tm6000-video.c @@ -434,6 +434,7 @@ static void tm6000_irq_callback(struct urb *urb) struct tm6000_dmaqueue *dma_q = urb->context; struct tm6000_core *dev = container_of(dma_q, struct tm6000_core, vidq); int i; + unsigned long flags; switch (urb->status) { case 0: @@ -450,9 +451,9 @@ static void tm6000_irq_callback(struct urb *urb) break; } - spin_lock(&dev->slock); + spin_lock_irqsave(&dev->slock, flags); tm6000_isoc_copy(urb); - spin_unlock(&dev->slock); + spin_unlock_irqrestore(&dev->slock, flags); /* Reset urb buffers */ for (i = 0; i < urb->number_of_packets; i++) { -- 1.7.9.5