From patchwork Fri Jun 24 05:39:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9196653 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 E7C556127B for ; Fri, 24 Jun 2016 05:40:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAEBA28489 for ; Fri, 24 Jun 2016 05:40:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8C5128497; Fri, 24 Jun 2016 05:40:55 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 82FEC28489 for ; Fri, 24 Jun 2016 05:40:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751372AbcFXFkf (ORCPT ); Fri, 24 Jun 2016 01:40:35 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33777 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751255AbcFXFk0 (ORCPT ); Fri, 24 Jun 2016 01:40:26 -0400 Received: by mail-wm0-f66.google.com with SMTP id r201so2203001wme.0 for ; Thu, 23 Jun 2016 22:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=zu6N2h94zNE6GU0+bqdWeykUVgrMQ5CNYKpZq9WIcn4=; b=RA3kAZBY8/M9sT/SRfIdJqr1DqixfLTDyOr2VIOU5yngVEEGWpP7ITdWDvXnCXzxyR OP6SFMeCI3N2Jj9Tcnqynp2BO2gY/EiXoB0GN1U17XPAKWESHLqNzPy+6G9j0tgd4xFy VhF0kkb812T2AzrwDeXSHCjVRMEO8q+kLdSM3Fdr1r3FiN+hS5YHSVLHRwc+x6NvDJCW bfvEX2A/jmYVMD2wkD6X/m3h+aVMlolKCQ6C3B+bx/QvP2z5biLMeniAP5Ef0OzohjcI GXoboE4UZIc7bOLX67YecmKRGyVgrrxU+L1JOHp+w2ENjpcV6YHKkARWbE3NMFtrIfsR ztBQ== 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:cc:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=zu6N2h94zNE6GU0+bqdWeykUVgrMQ5CNYKpZq9WIcn4=; b=cyuSTu8iG75oOfnneCoppqhOnarU/erf69/MeYc1xPSPCJu0RT+g2tbLSuylBagfw2 NaenXoWDqv+F2O3zKaARQBvDkKIhJHNw5oqxFVWxkKEX/8QkR+m7l8zP0zruM3rBuKjM de41UbaG6WWcbeZ4GTfeu4XiE7QLTwrEM7/mZHDGeudD2apB1dEg+/YlVQ4CwjXYdVu3 6dNmoH10Cz4d01vBDAAmrRGD9nsGjTjIeU5b7u/rjeE82eLGW/CfPWYX+cbaOuZxwcaW urzx+KBDxVWhSDcMsSfXDZZx0iRixoUrhC8b+SUqBMOKsL5mjWa6z8OCIUkwAXRQhMwT UGtQ== X-Gm-Message-State: ALyK8tJz5XW4bplr74mBXw1hexhEV1vK8nSaNTO6ojgHyFLbf7jUbzzJMtHjUVMBsLAl6Q== X-Received: by 10.28.207.13 with SMTP id f13mr17241503wmg.53.1466746824891; Thu, 23 Jun 2016 22:40:24 -0700 (PDT) Received: from ?IPv6:2003:62:5f01:4400:1482:e189:e8da:8d18? (p200300625F0144001482E189E8DA8D18.dip0.t-ipconnect.de. [2003:62:5f01:4400:1482:e189:e8da:8d18]) by smtp.googlemail.com with ESMTPSA id r127sm1298970wmf.21.2016.06.23.22.40.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 22:40:24 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH 7/9] media: rc: nuvoton: simplify interrupt handling code To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Message-ID: <0dc7ab35-7fef-b1df-8890-a204077b3683@gmail.com> Date: Fri, 24 Jun 2016 07:39:51 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 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 Simplify interupt handling code. Signed-off-by: Heiner Kallweit --- drivers/media/rc/nuvoton-cir.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index 5ce0238..180f589 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -906,17 +906,12 @@ static irqreturn_t nvt_cir_isr(int irq, void *data) if (status & CIR_IRSTS_RFO) nvt_handle_rx_fifo_overrun(nvt); - if (status & CIR_IRSTS_RTR) { + else if (status & (CIR_IRSTS_RTR | CIR_IRSTS_PE)) { /* We only do rx if not tx'ing */ if (nvt_cir_tx_inactive(nvt)) nvt_get_rx_ir_data(nvt); } - if (status & CIR_IRSTS_PE) { - if (nvt_cir_tx_inactive(nvt)) - nvt_get_rx_ir_data(nvt); - } - spin_unlock_irqrestore(&nvt->nvt_lock, flags); if (status & CIR_IRSTS_TE)