diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2014-10-20 09:40:01 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-11-24 01:45:17 -0500 |
commit | 24c71c83ed5994f07aabe137decbe3434791938c (patch) | |
tree | 53b4a1b4e9cea8f5a2f2d3814edeed98d82ea247 /arch/mips/alchemy | |
parent | a45da5659852bd4cbe453b49f5b26def65f5a6bf (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 <tomeu.vizoso@collabora.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Manuel Lauss <manuel.lauss@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8120/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy')
-rw-r--r-- | arch/mips/alchemy/common/clock.c | 7 |
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 @@ | |||
37 | #include <linux/io.h> | 37 | #include <linux/io.h> |
38 | #include <linux/clk-provider.h> | 38 | #include <linux/clk-provider.h> |
39 | #include <linux/clkdev.h> | 39 | #include <linux/clkdev.h> |
40 | #include <linux/clk-private.h> | ||
41 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
42 | #include <linux/spinlock.h> | 41 | #include <linux/spinlock.h> |
43 | #include <linux/types.h> | 42 | #include <linux/types.h> |
@@ -397,10 +396,10 @@ static long alchemy_clk_fgcs_detr(struct clk_hw *hw, unsigned long rate, | |||
397 | break; | 396 | break; |
398 | 397 | ||
399 | /* if this parent is currently unused, remember it. | 398 | /* if this parent is currently unused, remember it. |
400 | * XXX: I know it's a layering violation, but it works | 399 | * XXX: we would actually want clk_has_active_children() |
401 | * so well.. (if (!clk_has_active_children(pc)) ) | 400 | * but this is a good-enough approximation for now. |
402 | */ | 401 | */ |
403 | if (pc->prepare_count == 0) { | 402 | if (!__clk_is_prepared(pc)) { |
404 | if (!free) | 403 | if (!free) |
405 | free = pc; | 404 | free = pc; |
406 | } | 405 | } |