Skip to contentSkip to conversation

powerpc/time: Replace <linux/clk-provider.h> by <linux/of_clk.h>

PATCH Applied Geert Uytterhoeven 2 participants 2 messages Feb 13, 2020 – Apr 6, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 powerpc/time: Replace <linux/clk-provider.h> by <linux/of_clk.h>

The PowerPC time code is not a clock provider, and just needs to call of_clk_init().

Hence it can include <linux/of_clk.h> instead of <linux/clk-provider.h>.

Remove the #ifdef protecting the of_clk_init() call, as a stub is available for the !CONFIG_COMMON_CLK case.

---
v2:
- Add Reviewed-by,
- Remove #ifdef.

---
 arch/powerpc/kernel/time.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/powerpc/kernel/time.c +1 -3
index 1168e8b37e30696d..8ce3fa8a8c0a2d63 100644
@@ -50,7 +50,7 @@
 #include <linux/irq.h>
 #include <linux/delay.h>
 #include <linux/irq_work.h>
-#include <linux/clk-provider.h>
+#include <linux/of_clk.h>
 #include <linux/suspend.h>
 #include <linux/sched/cputime.h>
 #include <linux/processor.h>
@@ -1158,9 +1158,7 @@ void __init time_init(void)
 	init_decrementer_clockevent();
 	tick_setup_hrtimer_broadcast();
 
-#ifdef CONFIG_COMMON_CLK
 	of_clk_init(NULL);
-#endif
 }
 
 /*
Signature · 1 line
2.17.1
#1 lore raw
Quoted 10 lines · Geert Uytterhoeven

The PowerPC time code is not a clock provider, and just needs to call of_clk_init().

Hence it can include <linux/of_clk.h> instead of <linux/clk-provider.h>.

Remove the #ifdef protecting the of_clk_init() call, as a stub is available for the !CONFIG_COMMON_CLK case.

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/60083063b755e29685902609e024ecd0c4a1a7d9

cheers