From patchwork Mon Apr 24 07:54:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 98027 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1367131qgf; Mon, 24 Apr 2017 00:54:37 -0700 (PDT) X-Received: by 10.84.178.131 with SMTP id z3mr30775981plb.139.1493020477722; Mon, 24 Apr 2017 00:54:37 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p4si17922690pga.204.2017.04.24.00.54.37; Mon, 24 Apr 2017 00:54:37 -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 S1166311AbdDXHya (ORCPT + 4 others); Mon, 24 Apr 2017 03:54:30 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:62319 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1166314AbdDXHy1 (ORCPT ); Mon, 24 Apr 2017 03:54:27 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OOW009P6LYOI440@mailout3.w1.samsung.com>; Mon, 24 Apr 2017 08:54:24 +0100 (BST) Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170424075423eucas1p13f7b8f371bb33d4d4aa3f3af63629017~4RjOS_xPw2808528085eucas1p1j; Mon, 24 Apr 2017 07:54:23 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges4.samsung.com (EUCPMTA) with SMTP id CD.F6.04729.F2FADF85; Mon, 24 Apr 2017 08:54:23 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170424075423eucas1p239eaef08b93dade23292c175b838d9a5~4RjNmg-292322123221eucas1p2v; Mon, 24 Apr 2017 07:54:23 +0000 (GMT) X-AuditID: cbfec7f4-f79806d000001279-8b-58fdaf2f5407 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id EE.97.20206.84FADF85; Mon, 24 Apr 2017 08:54:48 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OOW00G8CLYJ3280@eusync4.samsung.com>; Mon, 24 Apr 2017 08:54:22 +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.1 2/6] clk: samsung: Add local variable to match it purpose Date: Mon, 24 Apr 2017 09:54:12 +0200 Message-id: <1493020452-23085-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrIIsWRmVeSWpSXmKPExsWy7djP87r66/9GGDyap2CxccZ6VovrX56z Wpw/v4Hd4mPPPVaLGef3MVmsPXKX3eLiKVeLw2/aWS1+nOlmceD0eH+jld3jcl8vk8emVZ1s Hn1bVjF6fN4kF8AaxWWTkpqTWZZapG+XwJXRuXwiU0Erb8Xn1kbmBsZXXF2MnBwSAiYS9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wgJ/E61P9YEUsAqoSR+c8ZwKxeQU8JG49PcMIsU5O4uSxyawgNqdAsMTHaS+ZQWwh gQCJq4ueMU5g5F3AyLCKUSS1tDg3PbfYSK84Mbe4NC9dLzk/dxMjMLy3Hfu5ZQdj17vgQ4wC HIxKPLwR3/9ECLEmlhVX5h5ilOBgVhLh7V7xN0KINyWxsiq1KD++qDQntfgQoynQUROZpUST 84Gxl1cSb2hiaG5paGRsYWFuZKQkzjv1w5VwIYH0xJLU7NTUgtQimD4mDk6pBsaIFaUL6qyc J/ftv3BDk8HD1OUjS8nN8xw/c5ViJ29KNVH88VNy/9G9K2fv3FITG2y0hOX2z9+1b08Kh7qq CyxhcPm8S9RWJvXOLr/aLQdW+qas/rI/iUF3m/VV1TUedTrpi/mSL1w8fD1NxaR4smZV04YN Vxw+PT6xtvht0oIP/R6RbBMKVe4osRRnJBpqMRcVJwIA61vtcYUCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170424075423eucas1p239eaef08b93dade23292c175b838d9a5 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: 20170424075423eucas1p239eaef08b93dade23292c175b838d9a5 X-RootMTR: 20170424075423eucas1p239eaef08b93dade23292c175b838d9a5 References: 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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 Reviewed-by: Krzysztof Kozlowski diff --git a/drivers/clk/samsung/clk-cpu.c b/drivers/clk/samsung/clk-cpu.c index 8bf7e805fd34..c6dd83dce09d 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); @@ -476,7 +477,7 @@ int __init exynos_register_cpu_clock(struct samsung_clk_provider *ctx, free_cpuclk_data: kfree(cpuclk->cfg); unregister_clk_nb: - clk_notifier_unregister(__clk_lookup(parent), &cpuclk->clk_nb); + clk_notifier_unregister(parent_clk, &cpuclk->clk_nb); free_cpuclk: kfree(cpuclk); return ret;