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: 9695665 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 EF0FA6037F for ; Mon, 24 Apr 2017 06:42:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3B692654B for ; Mon, 24 Apr 2017 06:42:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D860626B41; Mon, 24 Apr 2017 06:42:39 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 8B95E2654B for ; Mon, 24 Apr 2017 06:42:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1165686AbdDXGmj (ORCPT ); Mon, 24 Apr 2017 02:42:39 -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+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InEzU93GCFsMYkL99az dTFycQgJLGGUWLZ+PQuE08QksfNiA1gVm4ChRNfbLjYQW0TAQeLzp9eMIEXMAruZJC6efAxW 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?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= 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-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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);