mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master] clk: support inclusion of clk-provider.h in !COMMON_CLK code
Date: Mon,  1 Jul 2024 20:12:30 +0200	[thread overview]
Message-ID: <20240701181230.1189587-1-a.fatoum@pengutronix.de> (raw)

Most of the file is macros, but the little C code there is fails to
compile when built with !COMMON_CLK due to struct clk_div_table and
clk_hw_get_parent being undefined.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/linux/clk-provider.h | 2 ++
 include/linux/clk.h          | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index eab8305821e5..602e772a54bb 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -8,6 +8,8 @@
 
 #include <linux/clk.h>
 
+struct clk_div_table;
+
 long divider_round_rate_parent(struct clk_hw *hw, struct clk_hw *parent,
 			       unsigned long rate, unsigned long *prate,
 			       const struct clk_div_table *table,
diff --git a/include/linux/clk.h b/include/linux/clk.h
index bd107962fb88..ae03dcfdb2a2 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -187,6 +187,12 @@ static inline struct clk *clk_get_parent(struct clk *clk)
 	return NULL;
 }
 
+static inline struct clk_hw *clk_hw_get_parent(struct clk_hw *hw)
+
+{
+	return NULL;
+}
+
 static inline int clk_hw_get_parent_index(struct clk_hw *hw)
 {
 	return -EINVAL;
-- 
2.39.2




             reply	other threads:[~2024-07-01 18:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01 18:12 Ahmad Fatoum [this message]
2024-07-02  6:33 ` 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=20240701181230.1189587-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --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