From patchwork Wed Jan 18 17:46:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 9524429 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 2F56E60113 for ; Wed, 18 Jan 2017 17:50:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2021E26E8A for ; Wed, 18 Jan 2017 17:50:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1508C2860E; Wed, 18 Jan 2017 17:50:20 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AEA2726E8A for ; Wed, 18 Jan 2017 17:50:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cTuND-0007XS-I7; Wed, 18 Jan 2017 17:50:15 +0000 Received: from bh-25.webhostbox.net ([208.91.199.152]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cTuN9-0005tT-DH for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2017 17:50:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=References:In-Reply-To:Message-Id:Date:Subject: Cc:To:From; bh=8lZQMHoyAuSb96vOVKlgslm54nlLif6AInehkovopKY=; b=HrQWUwteopc1Q4 prM0ifirBG+N3OOIyGCub5eKqlSYx4z5BMm9f3BjVp43B+w+cJFrBh6+4ajE4HELd4OFayTOCPZ6d IAv9yMSqciZueOP/FXsm2MYGQeLjd6AzSebJ795iCA2zGEz5EZF0D8AEf0p5fYJ+DBrl8MA9HzH43 FSxaOhFPyKcVuRNLcLGxGpDng32gz/OLMRzVd/yoUDj33L6CrEanVrsAOhIYuWXgI+xmOrao7NZMt /wUcmPrzg4hL2VMM6hc/CLq/Z2r0foLkSuPA/pTbHeM5Gjv+sDFkbvc+ntXpTNXd5o3TNrGQ/371C /OO6tJLFNHnUz0F3sTmA==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:45202 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.86_1) (envelope-from ) id 1cTuLc-001luC-5I; Wed, 18 Jan 2017 17:48:36 +0000 From: Guenter Roeck To: Dmitry Torokhov Subject: [PATCH 23/33] Input: xilinx_ps2 - Use 'dev' instead of dereferencing it and other changes Date: Wed, 18 Jan 2017 09:46:44 -0800 Message-Id: <1484761614-12225-24-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484761614-12225-1-git-send-email-linux@roeck-us.net> References: <1484761614-12225-1-git-send-email-linux@roeck-us.net> X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170118_095011_534549_B5D32553 X-CRM114-Status: UNSURE ( 8.47 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guenter Roeck , Michal Simek , linux-kernel@vger.kernel.org, =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use local variable 'dev' instead of dereferencing it several times. This conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Use local variable 'struct device *dev' consistently Signed-off-by: Guenter Roeck --- drivers/input/serio/xilinx_ps2.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index 5223cbf94262..14c40892ed82 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c @@ -243,18 +243,17 @@ static int xps2_of_probe(struct platform_device *ofdev) unsigned int irq; int error; - dev_info(dev, "Device Tree Probing \'%s\'\n", - ofdev->dev.of_node->name); + dev_info(dev, "Device Tree Probing \'%s\'\n", dev->of_node->name); /* Get iospace for the device */ - error = of_address_to_resource(ofdev->dev.of_node, 0, &r_mem); + error = of_address_to_resource(dev->of_node, 0, &r_mem); if (error) { dev_err(dev, "invalid address\n"); return error; } /* Get IRQ for the device */ - irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); + irq = irq_of_parse_and_map(dev->of_node, 0); if (!irq) { dev_err(dev, "no IRQ found\n"); return -ENODEV;