Thread (5 messages) 5 messages, 2 authors, 2014-10-09
STALE4253d
Revisions (25)
  1. v4 [diff vs current]
  2. v4 [diff vs current]
  3. v5 [diff vs current]
  4. v6 [diff vs current]
  5. v7 [diff vs current]
  6. v7 [diff vs current]
  7. v8 [diff vs current]
  8. v9 [diff vs current]
  9. v10 [diff vs current]
  10. v11 [diff vs current]
  11. v12 [diff vs current]
  12. v13 [diff vs current]
  13. v1 [diff vs current]
  14. v2 [diff vs current]
  15. v3 current
  16. v4 [diff vs current]
  17. v5 [diff vs current]
  18. v6 [diff vs current]
  19. v7 [diff vs current]
  20. v8 [diff vs current]
  21. v9 [diff vs current]
  22. v10 [diff vs current]
  23. v11 [diff vs current]
  24. v12 [diff vs current]
  25. v13 [diff vs current]

[PATCH v3 1/8] MIPS: Alchemy: Remove direct access to prepare_count field of struct clk

From: Tomeu Vizoso <hidden>
Date: 2014-10-09 15:04:01
Also in: lkml
Subsystem: mips, the rest · Maintainers: Thomas Bogendoerfer, Linus Torvalds

Replacing it with a call to __clk_is_prepared(), which isn't entirely
equivalent but in practice shouldn't matter.

Signed-off-by: Tomeu Vizoso <redacted>
---
 arch/mips/alchemy/common/clock.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/mips/alchemy/common/clock.c b/arch/mips/alchemy/common/clock.c
index d7557cd..203e440 100644
--- a/arch/mips/alchemy/common/clock.c
+++ b/arch/mips/alchemy/common/clock.c
@@ -37,7 +37,6 @@
 #include <linux/io.h>
 #include <linux/clk-provider.h>
 #include <linux/clkdev.h>
-#include <linux/clk-private.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/types.h>
@@ -397,10 +396,10 @@ static long alchemy_clk_fgcs_detr(struct clk_hw *hw, unsigned long rate,
 			break;
 
 		/* if this parent is currently unused, remember it.
-		 * XXX: I know it's a layering violation, but it works
-		 * so well.. (if (!clk_has_active_children(pc)) )
+		 * XXX: we would actually want clk_has_active_children()
+		 * but this is a good-enough approximation for now.
 		 */
-		if (pc->prepare_count == 0) {
+		if (!__clk_is_prepared(pc)) {
 			if (!free)
 				free = pc;
 		}
-- 
1.9.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help