From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752762AbbL1KZl (ORCPT ); Mon, 28 Dec 2015 05:25:41 -0500 Received: from conuserg009.nifty.com ([202.248.44.35]:46754 "EHLO conuserg009-v.nifty.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750983AbbL1KW5 (ORCPT ); Mon, 28 Dec 2015 05:22:57 -0500 X-Nifty-SrcIP: [153.142.97.90] From: Masahiro Yamada To: linux-clk@vger.kernel.org Cc: Masahiro Yamada , Stephen Boyd , Michael Turquette , linux-kernel@vger.kernel.org Subject: [RESEND PATCH v2 02/16] clk: change the argument of __clk_init() into pointer to clk_core Date: Mon, 28 Dec 2015 19:22:56 +0900 Message-Id: <1451298191-30815-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1451298191-30815-1-git-send-email-yamada.masahiro@socionext.com> References: <1451298191-30815-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The argument clk_user is used only for the clk_user->core. The rest of this function only takes care of clk_core. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/clk/clk.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 897e5ae..623838f 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2285,25 +2285,22 @@ static inline void clk_debug_unregister(struct clk_core *core) #endif /** - * __clk_init - initialize the data structures in a struct clk - * @clk: clk being initialized + * __clk_init - initialize the data structures in a struct clk_core + * @core: clk_core being initialized * * Initializes the lists in struct clk_core, queries the hardware for the * parent and rate and sets them both. */ -static int __clk_init(struct clk *clk_user) +static int __clk_init(struct clk_core *core) { int i, ret = 0; struct clk_core *orphan; struct hlist_node *tmp2; - struct clk_core *core; unsigned long rate; - if (!clk_user) + if (!core) return -EINVAL; - core = clk_user->core; - clk_prepare_lock(); /* check to see if a clock with this name is already registered */ @@ -2574,7 +2571,7 @@ struct clk *clk_register(struct device *dev, struct clk_hw *hw) goto fail_parent_names_copy; } - ret = __clk_init(hw->clk); + ret = __clk_init(core); if (!ret) return hw->clk; -- 1.9.1