aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2014-10-20 15:40:01 +0200
committerRalf Baechle <[email protected]>2014-11-24 07:45:17 +0100
commit24c71c83ed5994f07aabe137decbe3434791938c (patch)
tree53b4a1b4e9cea8f5a2f2d3814edeed98d82ea247
parenta45da5659852bd4cbe453b49f5b26def65f5a6bf (diff)
MIPS: Alchemy: Remove direct access to prepare_count field of struct clk
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 <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Cc: Mike Turquette <[email protected]> Cc: Javier Martinez Canillas <[email protected]> Cc: Manuel Lauss <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/8120/ Signed-off-by: Ralf Baechle <[email protected]>
-rw-r--r--arch/mips/alchemy/common/clock.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/mips/alchemy/common/clock.c b/arch/mips/alchemy/common/clock.c
index d7557cde271a..203e4403c366 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;
}