From patchwork Wed Dec 30 16:39:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 7934201 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D9C12BEEE5 for ; Wed, 30 Dec 2015 16:46:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A00D202F2 for ; Wed, 30 Dec 2015 16:46:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 54506202F0 for ; Wed, 30 Dec 2015 16:46:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754868AbbL3Qqs (ORCPT ); Wed, 30 Dec 2015 11:46:48 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:32833 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753304AbbL3Qqq (ORCPT ); Wed, 30 Dec 2015 11:46:46 -0500 Received: by mail-wm0-f49.google.com with SMTP id f206so71488769wmf.0 for ; Wed, 30 Dec 2015 08:46:45 -0800 (PST) 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-type:content-transfer-encoding; bh=b2oYhTcOPC5JxLfa8WoCCwaCJwZKI7dyhHsfEd6v8kM=; b=Q0SLKxw3CKZ6eH3BYPRe7oyuk6EAsAu/U1pqAcCA6vJunRVU2CU/l8VDQ4A9UZ0vuA kMX85ojbey0BZegta5Tzkvbpp5CjeOrsk4nHJd2FDZUoA3aaSW7NyHec3+8VinDbL+Yh 0Y4NmTAW4ISg49irKyAhcqpvvtgIhYn7+Ap03SbUD2cXeMQ5g4OEUlN4/RYC5AZNJ7r2 9LksKO9cc7pv9fK+nuBBBq2YRMAsVdhll/vFvyQcKjSh/pXrYsMfbYGkU0/0paScq+f+ 3PzLdA9G2nkMO6DdzEBQblk439zPYSEdG1/nXHYTO1N6n15YdHzTjYqts2+gIi+n38QG k1AQ== X-Received: by 10.195.13.129 with SMTP id ey1mr30724414wjd.132.1451494004182; Wed, 30 Dec 2015 08:46:44 -0800 (PST) Received: from ?IPv6:2003:62:5f55:ba00:84bb:b7f:fe67:66b9? (p200300625F55BA0084BB0B7FFE6766B9.dip0.t-ipconnect.de. [2003:62:5f55:ba00:84bb:b7f:fe67:66b9]) by smtp.googlemail.com with ESMTPSA id m65sm34567137wma.13.2015.12.30.08.46.43 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 Dec 2015 08:46:43 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 03/16] media: rc: nuvoton-cir: simplify nvt_cir_tx_inactive To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Message-ID: <568408CD.7070009@gmail.com> Date: Wed, 30 Dec 2015 17:39:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.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-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Simplify nvt_cir_tx_inactive. Signed-off-by: Heiner Kallweit --- drivers/media/rc/nuvoton-cir.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index 2539d4f..f661eff 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -742,16 +742,13 @@ static void nvt_cir_log_irqs(u8 status, u8 iren) static bool nvt_cir_tx_inactive(struct nvt_dev *nvt) { unsigned long flags; - bool tx_inactive; u8 tx_state; spin_lock_irqsave(&nvt->tx.lock, flags); tx_state = nvt->tx.tx_state; spin_unlock_irqrestore(&nvt->tx.lock, flags); - tx_inactive = (tx_state == ST_TX_NONE); - - return tx_inactive; + return tx_state == ST_TX_NONE; } /* interrupt service routine for incoming and outgoing CIR data */