[PATCH 1/2] clk: change clk_get_num_parents into clk_hw_get_num_parents
Ahmad Fatoum
ahmad at a3f.at
Thu Jan 13 22:59:52 PST 2022
There is no clk_get_num_parents in Linux, but clk_hw_get_num_parents.
Our only users uses it with a clk_hw, so adjust the function
accordingly.
Signed-off-by: Ahmad Fatoum <ahmad at a3f.at>
---
drivers/clk/at91/clk-generated.c | 2 +-
include/linux/clk.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/at91/clk-generated.c b/drivers/clk/at91/clk-generated.c
index 628ff407d91e..e639fb3a1a65 100644
--- a/drivers/clk/at91/clk-generated.c
+++ b/drivers/clk/at91/clk-generated.c
@@ -92,7 +92,7 @@ static int clk_generated_set_parent(struct clk_hw *hw, u8 index)
{
struct clk_generated *gck = to_clk_generated(hw);
- if (index >= clk_get_num_parents(clk_hw_to_clk(hw)))
+ if (index >= clk_hw_get_num_parents(hw))
return -EINVAL;
gck->parent_id = index;
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 6565429a9b9f..481c28871258 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -721,9 +721,9 @@ int of_clk_add_provider(struct device_node *np,
void *data),
void *data);
-static inline unsigned int clk_get_num_parents(const struct clk *hw)
+static inline unsigned int clk_hw_get_num_parents(const struct clk_hw *hw)
{
- return hw->num_parents;
+ return hw->clk.num_parents;
}
#else
--
2.33.0
More information about the barebox
mailing list