| From 107769499b703174ec0fb7cc1de2ec309d48e937 Mon Sep 17 00:00:00 2001 |
| From: Olof Johansson <olof@lixom.net> |
| Date: Wed, 18 Dec 2019 09:56:21 -0800 |
| Subject: [PATCH] clk: Move clk_core_reparent_orphans() under CONFIG_OF |
| |
| commit c771256ee7a03d3fb3c0443319ae6249c455849d upstream. |
| |
| 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: 66d9506440bb ("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> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c |
| index 60e0a37d7d49..5b518fed409e 100644 |
| --- a/drivers/clk/clk.c |
| +++ b/drivers/clk/clk.c |
| @@ -3215,13 +3215,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 |
| @@ -4092,6 +4085,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 |
| -- |
| 2.7.4 |
| |