Commit 4a4472fd authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Stephen Boyd

of: clk: Make of_clk_get_parent_{count,name}() parameter const

of_clk_get_parent_count() and of_clk_get_parent_name() never modify the
device nodes passed, so they can be const.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Link: https://lkml.kernel.org/r/20200212094317.1150-1-geert+renesas@glider.beSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent bb6d3fb3
...@@ -4713,7 +4713,7 @@ EXPORT_SYMBOL(of_clk_get_by_name); ...@@ -4713,7 +4713,7 @@ EXPORT_SYMBOL(of_clk_get_by_name);
* *
* Returns: The number of clocks that are possible parents of this node * Returns: The number of clocks that are possible parents of this node
*/ */
unsigned int of_clk_get_parent_count(struct device_node *np) unsigned int of_clk_get_parent_count(const struct device_node *np)
{ {
int count; int count;
...@@ -4725,7 +4725,7 @@ unsigned int of_clk_get_parent_count(struct device_node *np) ...@@ -4725,7 +4725,7 @@ unsigned int of_clk_get_parent_count(struct device_node *np)
} }
EXPORT_SYMBOL_GPL(of_clk_get_parent_count); EXPORT_SYMBOL_GPL(of_clk_get_parent_count);
const char *of_clk_get_parent_name(struct device_node *np, int index) const char *of_clk_get_parent_name(const struct device_node *np, int index)
{ {
struct of_phandle_args clkspec; struct of_phandle_args clkspec;
struct property *prop; struct property *prop;
......
...@@ -11,17 +11,17 @@ struct of_device_id; ...@@ -11,17 +11,17 @@ struct of_device_id;
#if defined(CONFIG_COMMON_CLK) && defined(CONFIG_OF) #if defined(CONFIG_COMMON_CLK) && defined(CONFIG_OF)
unsigned int of_clk_get_parent_count(struct device_node *np); unsigned int of_clk_get_parent_count(const struct device_node *np);
const char *of_clk_get_parent_name(struct device_node *np, int index); const char *of_clk_get_parent_name(const struct device_node *np, int index);
void of_clk_init(const struct of_device_id *matches); void of_clk_init(const struct of_device_id *matches);
#else /* !CONFIG_COMMON_CLK || !CONFIG_OF */ #else /* !CONFIG_COMMON_CLK || !CONFIG_OF */
static inline unsigned int of_clk_get_parent_count(struct device_node *np) static inline unsigned int of_clk_get_parent_count(const struct device_node *np)
{ {
return 0; return 0;
} }
static inline const char *of_clk_get_parent_name(struct device_node *np, static inline const char *of_clk_get_parent_name(const struct device_node *np,
int index) int index)
{ {
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment