From patchwork Tue Aug 2 05:45:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9255203 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 012416048B for ; Tue, 2 Aug 2016 06:00:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5CBC284F2 for ; Tue, 2 Aug 2016 06:00:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAA6328504; Tue, 2 Aug 2016 06:00:12 +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 8FF35284F2 for ; Tue, 2 Aug 2016 06:00:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756226AbcHBGAJ (ORCPT ); Tue, 2 Aug 2016 02:00:09 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33342 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751475AbcHBGAI (ORCPT ); Tue, 2 Aug 2016 02:00:08 -0400 Received: by mail-wm0-f65.google.com with SMTP id o80so29000663wme.0 for ; Mon, 01 Aug 2016 23:00:07 -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=rstjy7MTs63q2BYSh9d7LBCHX/EUtmIPUyE3XlEX7gY=; b=U5y76SeIrOh1/dJLfKSN2eWOK48/aYGr+svJTUy9tFwzwlwZXjHoN7iAa2hfyDafdd +EPyOqKXBkjaPt/RDmoaTklC5MjUyFskl3xTSA5qEBzd5P9Gm0tKgPzaQBezyiyBFo3u 3UBBc3eWWevTIbqbWhfqs5LJN+s/8PDPxlS1KOd2ka3Vgj7rDTGaLzv/mP04jGW4CZxH 1f99yykCKE/5iWadVS23qvHLbWCQs3skSlvYuicXYBmmiKepCuYZakq1fTJKwOVYwC7a PxO1K40ImJBxF33uP0Ix9VgWwgVS194/Wi4zLNkzpudZ/Y/YIUbbdz48FbZcuVnE50Tx bQ1w== 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=rstjy7MTs63q2BYSh9d7LBCHX/EUtmIPUyE3XlEX7gY=; b=Z60JcsBcxuu2SIuSvSV98xRrgVmMVTW7lYYOBB3XxCrhTwWQ/LeJA2HrcvhZ80wgwZ lpTqCSSvI5wAYM0XOHVHanXZLPHKVjlhHCbj+gXnx+gTJtjhHdWheo2Evx9Bzb3xhy/+ tyomFPSBYenQuFW3bUFRW7v4QnbQs0uS6RT+KMhtPx5HBQdMTo9uGBvk0ZlmI4XhbAqz uLUAbtxLbjoxLPHTnR1ivnv1kkiEGe110Unz+eyfX0st3i98LhhglSOy9sJT56gVR392 7CwJ/E7Uc3WzZEeFNQN4dYc5yO8AjPHF3Uae2KufH3lgdi5s8xXF/lQmKmU/V5uGAma8 400A== X-Gm-Message-State: AEkooutsp/9zWWelGHs3c+pOV4U5OwzgBuvgTy4seXZnZIbtO3/0RiEDJx9R2GI2Izeiow== X-Received: by 10.194.175.170 with SMTP id cb10mr24114832wjc.17.1470116763006; Mon, 01 Aug 2016 22:46:03 -0700 (PDT) Received: from ?IPv6:2003:62:5f01:4400:28d9:4ab3:6068:8ae5? (p200300625F01440028D94AB360688AE5.dip0.t-ipconnect.de. [2003:62:5f01:4400:28d9:4ab3:6068:8ae5]) by smtp.googlemail.com with ESMTPSA id p4sm761545wjq.27.2016.08.01.22.46.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Aug 2016 22:46:02 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH 2/3] media: rc: nuvoton: remove unneeded call to ir_raw_event_handle To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Message-ID: <5f099e64-0e93-dd76-70aa-023f8538fa38@gmail.com> Date: Tue, 2 Aug 2016 07:45:30 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 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 ir_raw_event_handle is called anyway after the hw fifo content stored in nvt->buf[] has been written to the kfifo. There is not really a benefit in the potential additional call to ir_raw_event_handle whilst nvt->buf[] is being processed. Getting rid of this additional call allows to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/media/rc/nuvoton-cir.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index e4158a9..fc462f6 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -769,21 +769,11 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt) rawir.pulse ? "pulse" : "space", rawir.duration); ir_raw_event_store_with_filter(nvt->rdev, &rawir); - - /* - * BUF_PULSE_BIT indicates end of IR data, BUF_REPEAT_BYTE - * indicates end of IR signal, but new data incoming. In both - * cases, it means we're ready to call ir_raw_event_handle - */ - if ((sample == BUF_PULSE_BIT) && (i + 1 < nvt->pkts)) { - nvt_dbg("Calling ir_raw_event_handle (signal end)\n"); - ir_raw_event_handle(nvt->rdev); - } } nvt->pkts = 0; - nvt_dbg("Calling ir_raw_event_handle (buffer empty)\n"); + nvt_dbg("Calling ir_raw_event_handle\n"); ir_raw_event_handle(nvt->rdev); nvt_dbg_verbose("%s done", __func__);