Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1298590

[RESEND PATCH v2 02/16] clk: change the argument of __clk_init() into pointer to clk_core

From Masahiro Yamada <yamada.masahiro@socionext.com>
Newsgroups linux.kernel
Subject [RESEND PATCH v2 02/16] clk: change the argument of __clk_init() into pointer to clk_core
Date 2015-12-28 11:30 +0100
Message-ID <qKDdU-wt-29@gated-at.bofh.it> (permalink)
References <qKDdT-wt-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <yamada.masahiro@socionext.com>
---

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RESEND PATCH v2 00/16] clk: a collection of various clean-ups and improvements Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 15/16] clk: simplify clk_fetch_parent_index() function Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 09/16] clk: replace pr_warn() with pr_err() for fatal cases Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 04/16] clk: remove unnecessary !core->parents conditional Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 02/16] clk: change the argument of __clk_init() into pointer to clk_core Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 14/16] clk: make sure parent is not NULL in clk_fetch_parent_index() Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 05/16] clk: change sizeof(struct clk *) to sizeof(*core->parents) Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 11/16] clk: simplify __clk_init_parent() Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 12/16] clk: avoid circular clock topology Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 16/16] clk: slightly optimize clk_core_set_parent() Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 06/16] clk: move core->parents allocation to clk_register() Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 03/16] clk: rename __clk_init() into __clk_core_init() Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 10/16] clk: move checking .git_parent to __clk_core_init() Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 08/16] clk: drop the initial core->parents look-ups from __clk_core_init() Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100
  [RESEND PATCH v2 07/16] clk: simplify clk_core_get_parent_by_index() Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-28 11:30 +0100

csiph-web