From patchwork Tue Oct 25 19:23:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9395277 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 19E1960233 for ; Tue, 25 Oct 2016 19:24:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59BB729730 for ; Tue, 25 Oct 2016 19:24:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E38729736; Tue, 25 Oct 2016 19:24:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D34F629732 for ; Tue, 25 Oct 2016 19:24:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933799AbcJYTYV (ORCPT ); Tue, 25 Oct 2016 15:24:21 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36412 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932932AbcJYTYT (ORCPT ); Tue, 25 Oct 2016 15:24:19 -0400 Received: by mail-wm0-f66.google.com with SMTP id c78so1922562wme.3 for ; Tue, 25 Oct 2016 12:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=Q1fg3hrqOeSLcoiGX70hw9TKVMPdizseXHsS9auSw7c=; b=Xeu/RgXsIk5A/N/cOPq+z+tPZfX0ErmtNpxVNAQIcNYVT62TrUPVA8y4ABQVAI7vQO uvUJLOrn48sehjZPWFIu71Oo1KEwUGKAAjWczzvNtfrLxSnPqlsnwsrh+wLyVLVY+dEM Un4G9AC7IZEY4wvTL2x2xCxVB58H4pAf8rG/l+KX5woF4IYlg3JxFx5lhgZiSoHZQGaO h6yJjFNFC7ggPJ3s/mUT7kgeHnPe7MIXb0b7iXYSwpqSwIXs7Ap8yqP5+FT/yCy4F6yz 9mJbfAfR+crhBHfm/e73lRTNpB08KpQ7o3c40OpnAnBhi1zwjIRsYH2hGULX9EGRjY4L dR4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Q1fg3hrqOeSLcoiGX70hw9TKVMPdizseXHsS9auSw7c=; b=OGYG2dLQ+s+aVao89B1Urd5kAw/juOTbBD8x9rrRBMdYbIXMfP0ytE3pyW7C1XEBKG sH1TeVcW0gjMbNho2Cmo7Sw1eVdj/FbAlukHfA4x2fHd6kxMC1eBUUx5qQje2NBT7e7R KTUFuKOMoTVPuXMznxhmn21QNN8TwpJ2YPf6+pg0BT9HgWJT4QDUX+gRtY0JcK+t2Zun gv531XrQncts2D06fkrRqji07kRPlDKKH7R+E1n1RgoOBucDDNsnvdHo4QUAcIWN1dhb VOSUB8LcrUv6NbOCushO6rS9TFQxU0smeFq5jjDH/0LWT6G5MwjwbTI5fW8YkpzyI5if 8mWw== X-Gm-Message-State: ABUngveD4cTKqprLtCguSd2Wz8/XXMwUZgIlU7Z2VqDdMeTe6pZWRe/LTe+leq3zOuv+6A== X-Received: by 10.28.174.81 with SMTP id x78mr4513191wme.80.1477423457470; Tue, 25 Oct 2016 12:24:17 -0700 (PDT) Received: from ?IPv6:2003:62:5f6e:ba00:954e:ed47:430f:d580? (p200300625F6EBA00954EED47430FD580.dip0.t-ipconnect.de. [2003:62:5f6e:ba00:954e:ed47:430f:d580]) by smtp.googlemail.com with ESMTPSA id j185sm5287882wmg.13.2016.10.25.12.24.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Oct 2016 12:24:17 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH 5/5] media: rc: nuvoton: replace usage of spin_lock_irqsave in ISR To: Mauro Carvalho Chehab References: Cc: linux-media@vger.kernel.org Message-ID: Date: Tue, 25 Oct 2016 21:23:52 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Kernel takes care that interrupts from one source are serialized. So there's no need to use spinlock_irq_save. Signed-off-by: Heiner Kallweit --- drivers/media/rc/nuvoton-cir.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index 6332cf3..f21a2bc 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -840,11 +840,10 @@ static irqreturn_t nvt_cir_isr(int irq, void *data) { struct nvt_dev *nvt = data; u8 status, iren; - unsigned long flags; nvt_dbg_verbose("%s firing", __func__); - spin_lock_irqsave(&nvt->lock, flags); + spin_lock(&nvt->lock); /* * Get IR Status register contents. Write 1 to ack/clear @@ -866,7 +865,7 @@ static irqreturn_t nvt_cir_isr(int irq, void *data) * logical device is being disabled. */ if (status == 0xff && iren == 0xff) { - spin_unlock_irqrestore(&nvt->lock, flags); + spin_unlock(&nvt->lock); nvt_dbg_verbose("Spurious interrupt detected"); return IRQ_HANDLED; } @@ -875,7 +874,7 @@ static irqreturn_t nvt_cir_isr(int irq, void *data) * status bit whether the related interrupt source is enabled */ if (!(status & iren)) { - spin_unlock_irqrestore(&nvt->lock, flags); + spin_unlock(&nvt->lock); nvt_dbg_verbose("%s exiting, IRSTS 0x0", __func__); return IRQ_NONE; } @@ -923,7 +922,7 @@ static irqreturn_t nvt_cir_isr(int irq, void *data) } } - spin_unlock_irqrestore(&nvt->lock, flags); + spin_unlock(&nvt->lock); nvt_dbg_verbose("%s done", __func__); return IRQ_HANDLED;