From patchwork Fri Jun 24 05:39:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9196655 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 DB2B3608A7 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 CA3ED28495 for ; Fri, 24 Jun 2016 05:40:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B904928492; 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 6125828492 for ; Fri, 24 Jun 2016 05:40:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751355AbcFXFke (ORCPT ); Fri, 24 Jun 2016 01:40:34 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35476 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751210AbcFXFkW (ORCPT ); Fri, 24 Jun 2016 01:40:22 -0400 Received: by mail-wm0-f67.google.com with SMTP id a66so2181127wme.2 for ; Thu, 23 Jun 2016 22:40:22 -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=dDMs0XTxacYovO6UDilAJj2AQmL6XbBvnXWQytkJa+0=; b=Y+PY0HJ89Ew1BSqzJsJpio107ln7hUUkG7jmO8MDILxY2/d8uCgXFM7AiIFIZQAG7v zQMEgmpXG60elHKQq1iEe7qifZmcnfrrGDFfQxiasbxZ0z53gu7gI6mlBpJZRkwxVgpy TDonF5I+EIA7Ha6btxsw0n2/EBAfDRyNmg5UjIU/oAZQjq/eHkaVwunrUo8/r7mVHPM1 tRwaLhuZhazfHcgEXECKzVhMiSl6bFRRktpDOvx4IYamt3fdc8dAtk8osEs+ulkOE5vf x2ocvm1/Hr0kdOZ3QRMkdgB7+E+NckDvTRbBa1juyZwZvy4bk9yf+6ORwHPO3FADB39Z Qe6A== 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=dDMs0XTxacYovO6UDilAJj2AQmL6XbBvnXWQytkJa+0=; b=abaNTGu/Q+Qrduv9RJ3cEMncAANUlmIJaAVWkNG8VwwVj1CsDIeEWqZVGoxCq23S2l UmwOELW7f2s65LqadVXC0eV7Z+/FW2Ssu6snVQEBLuxR3UdPG3RG7fZE40upBCF0E/k0 EzAssLDkOZlNpTEUysDDlbvLWl+cAH05VqH6dtQYGGHuQyN6eaCr8rcmLugNGdgS+5gi IvG9bN3ZXoEjfZzti6Snr1Ie8GpOYVDPr0Th0zk82oixXdki+3Aq7N3nU1OkfBbIobdZ eO6nvwhH1ch4efAU8sbyDbfVEDvwStEgKkvl6dLVE3y9h+2ZJiWEr1M1NriHktlWQ2il maEQ== X-Gm-Message-State: ALyK8tLzl6AOqiWDdoeQWPOGrzGf2c+3M7R3+HF3ZJPvJrnRfo98o8T+6ar3DBiDbSgUGQ== X-Received: by 10.28.44.87 with SMTP id s84mr3797373wms.61.1466746821442; Thu, 23 Jun 2016 22:40:21 -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 bb4sm3325750wjb.32.2016.06.23.22.40.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 22:40:21 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH 4/9] media: rc: nuvoton: simplify a few functions To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Message-ID: <4583ec6c-85bb-86f7-35cd-832779d2e9ac@gmail.com> Date: Fri, 24 Jun 2016 07:39:28 +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 a few functions. Signed-off-by: Heiner Kallweit --- drivers/media/rc/nuvoton-cir.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index c405c83..1d99f10 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -139,11 +139,7 @@ static inline void nvt_cir_reg_write(struct nvt_dev *nvt, u8 val, u8 offset) /* read val from cir config register */ static u8 nvt_cir_reg_read(struct nvt_dev *nvt, u8 offset) { - u8 val; - - val = inb(nvt->cir_addr + offset); - - return val; + return inb(nvt->cir_addr + offset); } /* write val to cir wake register */ @@ -156,11 +152,7 @@ static inline void nvt_cir_wake_reg_write(struct nvt_dev *nvt, /* read val from cir wake config register */ static u8 nvt_cir_wake_reg_read(struct nvt_dev *nvt, u8 offset) { - u8 val; - - val = inb(nvt->cir_wake_addr + offset); - - return val; + return inb(nvt->cir_wake_addr + offset); } /* don't override io address if one is set already */ @@ -487,9 +479,7 @@ static void nvt_cir_wake_ldev_init(struct nvt_dev *nvt) /* clear out the hardware's cir rx fifo */ static void nvt_clear_cir_fifo(struct nvt_dev *nvt) { - u8 val; - - val = nvt_cir_reg_read(nvt, CIR_FIFOCON); + u8 val = nvt_cir_reg_read(nvt, CIR_FIFOCON); nvt_cir_reg_write(nvt, val | CIR_FIFOCON_RXFIFOCLR, CIR_FIFOCON); }