From patchwork Mon Apr 24 06:42:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 98022 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1348090qgf; Sun, 23 Apr 2017 23:42:39 -0700 (PDT) X-Received: by 10.84.191.228 with SMTP id a91mr30780308pld.62.1493016159175; Sun, 23 Apr 2017 23:42:39 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1si17792965pfb.23.2017.04.23.23.42.38; Sun, 23 Apr 2017 23:42:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1165573AbdDXGmi (ORCPT + 4 others); Mon, 24 Apr 2017 02:42:38 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:30392 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1165574AbdDXGmf (ORCPT ); Mon, 24 Apr 2017 02:42:35 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OOW00F04IMUV020@mailout2.w1.samsung.com>; Mon, 24 Apr 2017 07:42:31 +0100 (BST) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170424064230eucas1p1e9ff5c07314760c98857c38f1889333e~4QkdLJmtV1143411434eucas1p1I; Mon, 24 Apr 2017 06:42:30 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 79.5F.04459.65E9DF85; Mon, 24 Apr 2017 07:42:30 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170424064229eucas1p2367a90a36b5bcb99f48a24e72b29a629~4QkcWNkGc3081030810eucas1p24; Mon, 24 Apr 2017 06:42:29 +0000 (GMT) X-AuditID: cbfec7f1-f796e6d00000116b-c4-58fd9e566354 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 34.8C.20206.F6E9DF85; Mon, 24 Apr 2017 07:42:55 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OOW00957IMPRV80@eusync3.samsung.com>; Mon, 24 Apr 2017 07:42:29 +0100 (BST) From: Marek Szyprowski To: linux-clk@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Stephen Boyd , Michael Turquette , Sylwester Nawrocki , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH v2 2/6] clk: samsung: Add local variable to match it purpose Date: Mon, 24 Apr 2017 08:42:19 +0200 Message-id: <1493016143-21569-3-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1493016143-21569-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrEIsWRmVeSWpSXmKPExsWy7djP87ph8/5GGPy+ymWxccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3eLiKVeLw2/aWS1+nOlmceD0eH+jld3jcl8vk8emVZ1s Hn1bVjF6fN4kF8AaxWWTkpqTWZZapG+XwJXx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eLzp9eMIEXMAruZJC6efAxW JCzgI3F83xIWEJtFQFXi552HYHFeAQ+JXycaodbJSZw8NpkVxOYU8JT4ta8TLC4EVNNxYRHL BEbeBYwMqxhFUkuLc9Nzi430ihNzi0vz0vWS83M3MQLDe9uxn1t2MHa9Cz7EKMDBqMTDG/H9 T4QQa2JZcWXuIUYJDmYlEV6xxL8RQrwpiZVVqUX58UWlOanFhxhNgY6ayCwlmpwPjL28knhD E0NzS0MjYwsLcyMjJXHeqR+uhAsJpCeWpGanphakFsH0MXFwSjUwtj3v9auv3p508LHy8Y+K qW5TW5iWbpTlXXb1/tX3qe7+7vGxu1u2G+SblE95o3J++6Rdk+r3SMvmsPt+Plx7U4L9apSi yaOrry6/l++pduSSP3abS0e2I1E82WPCfbGKJWrlR3yru3c6ZKcFKz15eP2jxxEjp4pPvjZd zx1VlmotzPTgji5WYinOSDTUYi4qTgQALLOLGYUCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170424064229eucas1p2367a90a36b5bcb99f48a24e72b29a629 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170424064229eucas1p2367a90a36b5bcb99f48a24e72b29a629 X-RootMTR: 20170424064229eucas1p2367a90a36b5bcb99f48a24e72b29a629 References: <1493016143-21569-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Add new variable to avoid using clk pointer for different purposes across the exynos_register_cpu_clock() function. This will help in future rewrite for the new clk_hw API. Signed-off-by: Marek Szyprowski --- drivers/clk/samsung/clk-cpu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/clk/samsung/clk-cpu.c b/drivers/clk/samsung/clk-cpu.c index 8bf7e805fd34..6e1c6007e721 100644 --- a/drivers/clk/samsung/clk-cpu.c +++ b/drivers/clk/samsung/clk-cpu.c @@ -410,6 +410,7 @@ int __init exynos_register_cpu_clock(struct samsung_clk_provider *ctx, { struct exynos_cpuclk *cpuclk; struct clk_init_data init; + struct clk *parent_clk; struct clk *clk; int ret = 0; @@ -440,15 +441,15 @@ int __init exynos_register_cpu_clock(struct samsung_clk_provider *ctx, goto free_cpuclk; } - clk = __clk_lookup(parent); - if (!clk) { + parent_clk = __clk_lookup(parent); + if (!parent_clk) { pr_err("%s: could not lookup parent clock %s\n", __func__, parent); ret = -EINVAL; goto free_cpuclk; } - ret = clk_notifier_register(clk, &cpuclk->clk_nb); + ret = clk_notifier_register(parent_clk, &cpuclk->clk_nb); if (ret) { pr_err("%s: failed to register clock notifier for %s\n", __func__, name);