From patchwork Sat Aug 17 16:25:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 2846010 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AC978BF546 for ; Sat, 17 Aug 2013 16:32:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CDD1D201E9 for ; Sat, 17 Aug 2013 16:32:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2CBB201DA for ; Sat, 17 Aug 2013 16:32:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753961Ab3HQQcA (ORCPT ); Sat, 17 Aug 2013 12:32:00 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:55397 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753878Ab3HQQb7 (ORCPT ); Sat, 17 Aug 2013 12:31:59 -0400 Received: by mail-pa0-f41.google.com with SMTP id bj1so3082162pad.14 for ; Sat, 17 Aug 2013 09:31:59 -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:in-reply-to:references; bh=9XiFaRzUmoWBk4urCwZ17ptinlcvmRn14zhrjoeb3+I=; b=X1WvdUTybyeQSReNiQHK7NoOeIb+dLHf7qOX9FdzRYE4jkYDoMhqYGPk6N0dOQwlXF cZHG3565aEgELjlQ5d1MvTrxEJoWez0oZX6mei5a0eymjrWzbiedUgGvqD5NxC6+mSgs QsnhHPZdNq9DwbvIlEFdTG1LyG/Y/+lHzUQLuZWI0//JWpRoIYl7rFGjPlG3K4x0bE5g xK45XwV+w0tW9feOqKnJsn749xUKVBcS/5lHjp5omfio8V8coxGfasY0GAdRY+qhdnDp 5iN3BCGBjisxBfDAbmPVJhyjtKAwk6ZVKumbMatOwGQF8HIjyy+2WoqmQ1Sy+hI2kkVJ 1A/w== X-Received: by 10.66.232.8 with SMTP id tk8mr3796687pac.121.1376757119585; Sat, 17 Aug 2013 09:31:59 -0700 (PDT) Received: from localhost ([183.37.213.217]) by mx.google.com with ESMTPSA id gg9sm4547341pbc.25.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 17 Aug 2013 09:31:58 -0700 (PDT) From: Ming Lei To: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, Oliver Neukum , Alan Stern , Ming Lei , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH v1 41/49] media: usb: tm6000: prepare for enabling irq in complete() Date: Sun, 18 Aug 2013 00:25:06 +0800 Message-Id: <1376756714-25479-42-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1376756714-25479-1-git-send-email-ming.lei@canonical.com> References: <1376756714-25479-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=-9.6 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 Acked-by: Hans Verkuil --- 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++) {