* [PATCH] fixup! clk: No-op CLK_OF_DECLARE if not enabled
@ 2017-03-10 6:07 Andrey Smirnov
2017-03-12 20:34 ` Sam Ravnborg
0 siblings, 1 reply; 3+ messages in thread
From: Andrey Smirnov @ 2017-03-10 6:07 UTC (permalink / raw)
To: barebox; +Cc: Andrey Smirnov
---
Sascha, let's try and see if this fixes the build issues you were
having with the original patch.
If you'd rather I spin a v2 of the original patch, let me know.
Thanks,
Andrey Smirnov
include/linux/clk.h | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index f705532..081a859 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -331,10 +331,6 @@ const struct of_device_id __clk_of_table_##name \
__attribute__ ((unused,section (".__clk_of_table"))) \
= { .compatible = compat, .data = fn }
-int of_clk_add_provider(struct device_node *np,
- struct clk *(*clk_src_get)(struct of_phandle_args *args,
- void *data),
- void *data);
void of_clk_del_provider(struct device_node *np);
typedef int (*of_clk_init_cb_t)(struct device_node *);
@@ -350,13 +346,26 @@ struct clk *of_clk_get(struct device_node *np, int index);
struct clk *of_clk_get_by_name(struct device_node *np, const char *name);
struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec);
unsigned int of_clk_get_parent_count(struct device_node *np);
-char *of_clk_get_parent_name(struct device_node *np, unsigned int index);
int of_clk_parent_fill(struct device_node *np, const char **parents,
unsigned int size);
int of_clk_init(struct device_node *root, const struct of_device_id *matches);
#else
-#define CLK_OF_DECLARE(name, compat, fn)
+
+/*
+ * Create a dummy variable to avoid 'unused function'
+ * warnings. Compiler should be smart enough to throw it out.
+ */
+#define CLK_OF_DECLARE(name, compat, fn) \
+static const struct of_device_id __clk_of_table_##name \
+__attribute__ ((unused)) = { .data = fn }
+
+
+static inline struct clk *
+of_clk_src_simple_get(struct of_phandle_args *clkspec, void *data)
+{
+ return ERR_PTR(-ENOENT);
+}
static inline struct clk *of_clk_get(struct device_node *np, int index)
{
@@ -378,4 +387,10 @@ struct string_list;
int clk_name_complete(struct string_list *sl, char *instr);
+int of_clk_add_provider(struct device_node *np,
+ struct clk *(*clk_src_get)(struct of_phandle_args *args,
+ void *data),
+ void *data);
+char *of_clk_get_parent_name(struct device_node *np, unsigned int index);
+
#endif
--
2.9.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fixup! clk: No-op CLK_OF_DECLARE if not enabled
2017-03-10 6:07 [PATCH] fixup! clk: No-op CLK_OF_DECLARE if not enabled Andrey Smirnov
@ 2017-03-12 20:34 ` Sam Ravnborg
2017-03-13 7:21 ` Sascha Hauer
0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2017-03-12 20:34 UTC (permalink / raw)
To: Andrey Smirnov; +Cc: barebox
On Thu, Mar 09, 2017 at 10:07:32PM -0800, Andrey Smirnov wrote:
> ---
>
> Sascha, let's try and see if this fixes the build issues you were
> having with the original patch.
>
> If you'd rather I spin a v2 of the original patch, let me know.
As Sasha dropped the original patch you can safely prepare a v2
of the original patch with this fix.
Sam
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fixup! clk: No-op CLK_OF_DECLARE if not enabled
2017-03-12 20:34 ` Sam Ravnborg
@ 2017-03-13 7:21 ` Sascha Hauer
0 siblings, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2017-03-13 7:21 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Andrey Smirnov, barebox
On Sun, Mar 12, 2017 at 09:34:39PM +0100, Sam Ravnborg wrote:
> On Thu, Mar 09, 2017 at 10:07:32PM -0800, Andrey Smirnov wrote:
> > ---
> >
> > Sascha, let's try and see if this fixes the build issues you were
> > having with the original patch.
> >
> > If you'd rather I spin a v2 of the original patch, let me know.
>
> As Sasha dropped the original patch you can safely prepare a v2
> of the original patch with this fix.
Yes, please. That would be easiest.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-13 7:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-10 6:07 [PATCH] fixup! clk: No-op CLK_OF_DECLARE if not enabled Andrey Smirnov
2017-03-12 20:34 ` Sam Ravnborg
2017-03-13 7:21 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox