9
0
Fork 0

clk: Make COMMON_CLK_OF_PROVIDER depend on OFTREE

Make COMMON_CLK_OF_PROVIDER depend on OFTREE, this way checking for:

	defined(CONFIG_OFTREE) && defined(CONFIG_COMMON_CLK_OF_PROVIDER)

can be simplified to just:

	defined(CONFIG_COMMON_CLK_OF_PROVIDER)

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Andrey Smirnov 2017-03-08 14:08:56 -08:00 committed by Sascha Hauer
parent b5ea2c6acc
commit a8b41f2c72
6 changed files with 6 additions and 5 deletions

View File

@ -10,6 +10,7 @@ config COMMON_CLK
config COMMON_CLK_OF_PROVIDER
bool
depends on OFTREE
help
Clock driver provides OF-Tree based clock lookup.

View File

@ -93,7 +93,7 @@ struct clk *clk_fixed_factor(const char *name,
return &f->clk;
}
#if defined(CONFIG_OFTREE) && defined(CONFIG_COMMON_CLK_OF_PROVIDER)
#if defined(CONFIG_COMMON_CLK_OF_PROVIDER)
/**
* of_fixed_factor_clk_setup() - Setup function for simple fixed factor clock
*/

View File

@ -55,7 +55,7 @@ struct clk *clk_fixed(const char *name, int rate)
return &fix->clk;
}
#if defined(CONFIG_OFTREE) && defined(CONFIG_COMMON_CLK_OF_PROVIDER)
#if defined(CONFIG_COMMON_CLK_OF_PROVIDER)
/**
* of_fixed_clk_setup() - Setup function for simple fixed rate clock
*/

View File

@ -346,7 +346,7 @@ int clk_parent_set_rate(struct clk *clk, unsigned long rate,
return clk_set_rate(clk_get_parent(clk), rate);
}
#if defined(CONFIG_OFTREE) && defined(CONFIG_COMMON_CLK_OF_PROVIDER)
#if defined(CONFIG_COMMON_CLK_OF_PROVIDER)
/**
* struct of_clk_provider - Clock provider registration structure
* @link: Entry in global list of clock providers

View File

@ -24,7 +24,7 @@
static LIST_HEAD(clocks);
#if defined(CONFIG_OFTREE) && defined(CONFIG_COMMON_CLK_OF_PROVIDER)
#if defined(CONFIG_COMMON_CLK_OF_PROVIDER)
struct clk *of_clk_get(struct device_node *np, int index)
{
struct of_phandle_args clkspec;

View File

@ -329,7 +329,7 @@ const struct of_device_id __clk_of_table_##name \
__attribute__ ((unused,section (".__clk_of_table"))) \
= { .compatible = compat, .data = fn }
#if defined(CONFIG_OFTREE) && defined(CONFIG_COMMON_CLK_OF_PROVIDER)
#if defined(CONFIG_COMMON_CLK_OF_PROVIDER)
int of_clk_add_provider(struct device_node *np,
struct clk *(*clk_src_get)(struct of_phandle_args *args,
void *data),