Merge tag 'iwlwifi-next-for-kalle-2014-12-30' of https://git.kernel.org/pub/scm/linux...
[cascardo/linux.git] / arch / mips / alchemy / common / clock.c
index f42dd0a..48a9dfc 100644 (file)
@@ -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;
                }