From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <ahmad@a3f.at>
Subject: [PATCH 1/2] clk: change clk_get_num_parents into clk_hw_get_num_parents
Date: Fri, 14 Jan 2022 07:59:52 +0100 [thread overview]
Message-ID: <20220114065953.698483-1-ahmad@a3f.at> (raw)
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@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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2022-01-14 7:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-14 6:59 Ahmad Fatoum [this message]
2022-01-14 6:59 ` [PATCH 2/2] clk: propagate error pointers in clk_hw_to_clk and clk_to_clk_hw Ahmad Fatoum
2022-01-14 8:26 ` [PATCH 1/2] clk: change clk_get_num_parents into clk_hw_get_num_parents Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220114065953.698483-1-ahmad@a3f.at \
--to=ahmad@a3f.at \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox