From patchwork Mon Jul 14 11:37:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naveen Krishna Chatradhi X-Patchwork-Id: 4545421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BF4F6C0514 for ; Mon, 14 Jul 2014 11:43:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0B0D820136 for ; Mon, 14 Jul 2014 11:43:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 29AE220122 for ; Mon, 14 Jul 2014 11:43:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X6edp-0007Sj-SM; Mon, 14 Jul 2014 11:41:57 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X6edQ-0006MJ-V5 for linux-arm-kernel@lists.infradead.org; Mon, 14 Jul 2014 11:41:33 +0000 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N8P00K0G9SMNFE0@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 14 Jul 2014 20:41:10 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 83.5F.24374.6D1C3C35; Mon, 14 Jul 2014 20:41:10 +0900 (KST) X-AuditID: cbfee68d-b7fd46d000005f36-f0-53c3c1d6c549 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id E8.F6.05196.6D1C3C35; Mon, 14 Jul 2014 20:41:10 +0900 (KST) Received: from chnaveen-ubuntu.sisodomain.com ([107.108.83.161]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N8P00BXR9RQIVA0@mmp2.samsung.com>; Mon, 14 Jul 2014 20:41:10 +0900 (KST) From: Naveen Krishna Chatradhi To: kgene.kim@samsung.com, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH 3/3] serial: samsung: improve code clarity by defining a variable Date: Mon, 14 Jul 2014 17:07:18 +0530 Message-id: <1405337838-30335-4-git-send-email-ch.naveen@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1405337838-30335-1-git-send-email-ch.naveen@samsung.com> References: <1405337838-30335-1-git-send-email-ch.naveen@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCLMWRmVeSWpSXmKPExsWyRsSkVvfawcPBBp9+yFhMWneAyeLlIU2L +UfOsVo0L17PZtG74CqbxabH11gtZpzfx+TA7vF31Qtmj/1z17B7bF5S79G3ZRWjx+dNcgGs UVw2Kak5mWWpRfp2CVwZtzY0sxSs4qpYtLGLtYHxFEcXIyeHhICJxIRbF5khbDGJC/fWs4HY QgJLGSXeHeOEqZnx+yFjFyMXUHw6o8Sa521sEE4/k8S001PZQarYBMwkDi5azQ6SEBFoYJRo WfwILMEs4Cqxc8dCFhBbWCBY4vbK86wgNouAqsTsI61gq3mBaua3fgGyOYDWKUjMmWQDEuYU cJPY8beDGeIiV4nLZ9vArpAQmM4u0frnGzvEHAGJb5MPsUD0ykpsOgD1jaTEwRU3WCYwCi9g ZFjFKJpakFxQ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/w6oL58ocFDc12LH3uFda51Ff5wKfr/0qPN36/oFhs9s/4aaLjisL2C2/8 orLjll12tphkfMfe8r6F+7Z/PO7RzsvyVeeITvl5zk+JpTgj0VCLuag4EQDaI99gtwIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140714_044133_186046_128428BC X-CRM114-Status: GOOD ( 10.40 ) X-Spam-Score: -5.0 (-----) Cc: gregkh@linuxfoundation.org, cpgs@samsung.com, ben-linux@fluff.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, 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 The of_node is derived from pdev for every usage, define a device_node variable instead. Signed-off-by: Naveen Krishna Chatradhi Cc: gregkh@linuxfoundation.org --- drivers/tty/serial/samsung.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index d98f93d..4aff02d 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1269,12 +1269,13 @@ static inline struct s3c24xx_serial_drv_data *s3c24xx_get_driver_data( static int s3c24xx_serial_probe(struct platform_device *pdev) { + struct device_node *np = pdev->dev.of_node; struct s3c24xx_uart_port *ourport; int index = probe_index; int ret; - if (pdev->dev.of_node) { - ret = of_alias_get_id(pdev->dev.of_node, "serial"); + if (np) { + ret = of_alias_get_id(np, "serial"); if (ret >= 0) index = ret; } @@ -1295,8 +1296,8 @@ static int s3c24xx_serial_probe(struct platform_device *pdev) dev_get_platdata(&pdev->dev) : ourport->drv_data->def_cfg; - if (pdev->dev.of_node) - of_property_read_u32(pdev->dev.of_node, + if (np) + of_property_read_u32(np, "samsung,uart-fifosize", &ourport->port.fifosize); if (!ourport->port.fifosize) {