diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2016-02-02 17:24:56 -0800 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2016-02-06 23:38:26 -0800 |
commit | 47b0eeb3dc8a01848ad62908000b1051d1833eaf (patch) | |
tree | a5b668fa3192466735e8089403db6381a0ec742e /drivers/clk/clk.c | |
parent | 14b04f28a0a1a5903221fc55c61d231b76abd440 (diff) |
clk: Deprecate CLK_IS_ROOT
We don't use CLK_IS_ROOT but in a few places in the common clk
framework core. Let's replace those checks with a check for the
number of parents a clk has instead of the flag, freeing up one
flag for something else. We don't remove the flag yet so that
things keep building, but we'll remove it once all drivers have
removed their flag usage.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r-- | drivers/clk/clk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index bb01ed6cc63e..cd8382c83f48 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -385,7 +385,7 @@ static unsigned long clk_core_get_rate_nolock(struct clk_core *core) ret = core->rate; - if (core->flags & CLK_IS_ROOT) + if (!core->num_parents) goto out; if (!core->parent) @@ -2351,7 +2351,7 @@ static int __clk_core_init(struct clk_core *core) /* * Populate core->parent if parent has already been __clk_init'd. If * parent has not yet been __clk_init'd then place clk in the orphan - * list. If clk has set the CLK_IS_ROOT flag then place it in the root + * list. If clk doesn't have any parents then place it in the root * clk list. * * Every time a new clk is clk_init'd then we walk the list of orphan @@ -2362,7 +2362,7 @@ static int __clk_core_init(struct clk_core *core) hlist_add_head(&core->child_node, &core->parent->children); core->orphan = core->parent->orphan; - } else if (core->flags & CLK_IS_ROOT) { + } else if (!core->num_parents) { hlist_add_head(&core->child_node, &clk_root_list); core->orphan = false; } else { |