Skip to content

Commit

Permalink
clk: Move clk_core_reparent_orphans() under CONFIG_OF
Browse files Browse the repository at this point in the history
A recent addition exposed a helper that is only used for CONFIG_OF. Move
it into the CONFIG_OF zone in this file to make the compiler stop
warning about an unused function.

Fixes: 66d9506 ("clk: walk orphan list on clock provider registration")
Signed-off-by: Olof Johansson <olof@lixom.net>
Link: https://lkml.kernel.org/r/20191217082501.424892072D@mail.kernel.org
[sboyd@kernel.org: "Simply" move the function instead]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Olof Johansson authored and Stephen Boyd committed Dec 18, 2019
1 parent 6956eb3 commit c771256
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3277,13 +3277,6 @@ static void clk_core_reparent_orphans_nolock(void)
}
}

static void clk_core_reparent_orphans(void)
{
clk_prepare_lock();
clk_core_reparent_orphans_nolock();
clk_prepare_unlock();
}

/**
* __clk_core_init - initialize the data structures in a struct clk_core
* @core: clk_core being initialized
Expand Down Expand Up @@ -4193,6 +4186,13 @@ int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb)
EXPORT_SYMBOL_GPL(clk_notifier_unregister);

#ifdef CONFIG_OF
static void clk_core_reparent_orphans(void)
{
clk_prepare_lock();
clk_core_reparent_orphans_nolock();
clk_prepare_unlock();
}

/**
* struct of_clk_provider - Clock provider registration structure
* @link: Entry in global list of clock providers
Expand Down

0 comments on commit c771256

Please sign in to comment.