From: geert+renesas@glider.be (Geert Uytterhoeven)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] [RFC] clk: Provide dummy of_clk_get_parent_count() for !OF/!CCF
Date: Fri, 29 May 2015 11:25:48 +0200 [thread overview]
Message-ID: <1432891549-23295-5-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1432891549-23295-1-git-send-email-geert+renesas@glider.be>
Provide dummy implementations of of_clk_get_parent_count() for the
cases where CONFIG_OF or CONFIG_COMMON_CLK are not set.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
This is an RFC, as
1. Dummies are needed in two places,
2. We don't have any dummies yet for the !CCF case.
---
include/linux/clk-provider.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 5378c2aba4d2eaec..d56bb0c6dd982c32 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -651,6 +651,10 @@ static inline struct clk *of_clk_src_onecell_get(
{
return ERR_PTR(-ENOENT);
}
+static inline int of_clk_get_parent_count(struct device_node *np)
+{
+ return -ENOENT;
+}
static inline const char *of_clk_get_parent_name(struct device_node *np,
int index)
{
@@ -696,5 +700,10 @@ struct dentry *clk_debugfs_add_file(struct clk_hw *hw, char *name, umode_t mode,
void *data, const struct file_operations *fops);
#endif
-#endif /* CONFIG_COMMON_CLK */
+#else /* !CONFIG_COMMON_CLK */
+static inline int of_clk_get_parent_count(struct device_node *np)
+{
+ return -ENOENT;
+}
+#endif /* !CONFIG_COMMON_CLK */
#endif /* CLK_PROVIDER_H */
--
1.9.1
next prev parent reply other threads:[~2015-05-29 9:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 9:25 [PATCH 0/5] clk: Use of_clk_get_parent_count() instead of open coding Geert Uytterhoeven
2015-05-29 9:25 ` [PATCH 1/5] clk: at91: " Geert Uytterhoeven
2015-05-30 7:43 ` Boris Brezillon
2015-06-04 20:52 ` Stephen Boyd
2015-05-29 9:25 ` [PATCH 2/5] clk: st: " Geert Uytterhoeven
2015-06-04 20:53 ` Stephen Boyd
2015-05-29 9:25 ` [PATCH 3/5] clk: ti: " Geert Uytterhoeven
2015-06-04 20:53 ` Stephen Boyd
2015-05-29 9:25 ` Geert Uytterhoeven [this message]
2015-05-29 9:25 ` [PATCH 5/5] [RFC] ARM: timer-sp: " Geert Uytterhoeven
2015-06-03 23:44 ` Stephen Boyd
2015-06-04 7:26 ` Geert Uytterhoeven
2015-06-04 18:14 ` Stephen Boyd
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=1432891549-23295-5-git-send-email-geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).