From patchwork Thu Jul 11 09:06:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 2826136 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 7068FC0AB2 for ; Thu, 11 Jul 2013 09:14:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C813020136 for ; Thu, 11 Jul 2013 09:14:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 81D7E200E0 for ; Thu, 11 Jul 2013 09:14:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932574Ab3GKJMk (ORCPT ); Thu, 11 Jul 2013 05:12:40 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:59832 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932590Ab3GKJMi (ORCPT ); Thu, 11 Jul 2013 05:12:38 -0400 Received: by mail-pa0-f42.google.com with SMTP id rl6so7691684pac.15 for ; Thu, 11 Jul 2013 02:12:37 -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=tj5ycJqPmSqTV2ovc6UFwy9Egj81cmPuhqGvRcOo/Ac=; b=GxbKOPmEe4und76BIzejd0+U7w2JKiEzXx25fIgrpJXLviwoSs6BZEzSGpb4IZG5v8 WlkOCRbkX9M40CRRsd7RPNu+9XcXsqomELxTeOV+T124hWO7wPxXxWKQRhYzvJ9Waq/C NGXYLtdnm8ZJwhao6hM0vP9cXn5movU5nL6PovY1Fvxb3DMHIuzRDNNb1zjnY5/0FDA6 iSa0Uw+CI9Y/ej8PPRHWf4svmrgv4c927Qgugt9tT4qb+e0zlRlt6WW2WWzEVxex5CJZ ktEeQSw8K3dkr4sF8LZ7ctMqQSq2wUtY9Cz3778WHyVIoMPAXkx1Nt7Gp/CUWr/rGEKC O3gg== X-Received: by 10.66.121.131 with SMTP id lk3mr37804269pab.43.1373533957262; Thu, 11 Jul 2013 02:12:37 -0700 (PDT) Received: from localhost ([183.37.203.123]) by mx.google.com with ESMTPSA id ve3sm38670178pbc.14.2013.07.11.02.12.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 11 Jul 2013 02:12:36 -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 , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 45/50] sound: usb: usx2y: spin_lock in complete() cleanup Date: Thu, 11 Jul 2013 17:06:08 +0800 Message-Id: <1373533573-12272-46-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=unavailable 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: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Signed-off-by: Ming Lei --- sound/usb/usx2y/usbusx2yaudio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index 4967fe9..e2ee893 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c @@ -273,7 +273,11 @@ static void usX2Y_clients_stop(struct usX2Ydev *usX2Y) struct snd_usX2Y_substream *subs = usX2Y->subs[s]; if (subs) { if (atomic_read(&subs->state) >= state_PRERUNNING) { + unsigned long flags; + + local_irq_save(flags); snd_pcm_stop(subs->pcm_substream, SNDRV_PCM_STATE_XRUN); + local_irq_restore(flags); } for (u = 0; u < NRURBS; u++) { struct urb *urb = subs->urb[u];