From patchwork Thu Jul 11 09:06:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 2826113 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B800E9F756 for ; Thu, 11 Jul 2013 09:12:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7442F20121 for ; Thu, 11 Jul 2013 09:12:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 511F520107 for ; Thu, 11 Jul 2013 09:12:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932524Ab3GKJLx (ORCPT ); Thu, 11 Jul 2013 05:11:53 -0400 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 Received: by mail-pa0-f49.google.com with SMTP id ld11so7607852pab.36 for ; Thu, 11 Jul 2013 02:11:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=9XiFaRzUmoWBk4urCwZ17ptinlcvmRn14zhrjoeb3+I=; b=A6BYNKuv2/2pfNLRxFQQJXne0wBqDZX9jmsoYZsJDXSYnXqlgbd9ssq5J0nDdX97pu hfe3z++sm/T3c5lkmKDZkenZDaeAL/vcLixCZaHgF2NtIppNfRDnKpd+NT3XS0rEOJ4V BTd4oJHneFqSTFIYz1QY2apQPJSHP+wyswOMr1AEnZr+T4HM8I9wQ5Eukm0puY/ck8V3 Svw/BQtROwDXKtw+/JpZSp3Vvc54N5tThdUEM8i2C+O/IYV8k6GiYkp/Dc7NnfkvuS76 wgxBWVG8+CNgQqM0mS/rZN6eN/ph+hOx5l64wNvVoJHP3qasyOaa0aK8ueg1sJM4u87x iYVQ== X-Received: by 10.66.148.41 with SMTP id tp9mr37748916pab.40.1373533909380; Thu, 11 Jul 2013 02:11:49 -0700 (PDT) Received: from localhost ([183.37.203.123]) by mx.google.com with ESMTPSA id iq6sm38684025pbc.1.2013.07.11.02.11.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 11 Jul 2013 02:11:48 -0700 (PDT) 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> X-Mailer: git-send-email 1.7.9.5 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-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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++) {