projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ARM: imx: fix .is_enabled() of shared gate clock
[cascardo/linux.git]
/
arch
/
arm
/
mach-imx
/
clk-gate2.c
diff --git
a/arch/arm/mach-imx/clk-gate2.c
b/arch/arm/mach-imx/clk-gate2.c
index
84acdfd
..
5a75cdc
100644
(file)
--- a/
arch/arm/mach-imx/clk-gate2.c
+++ b/
arch/arm/mach-imx/clk-gate2.c
@@
-97,7
+97,7
@@
static int clk_gate2_is_enabled(struct clk_hw *hw)
struct clk_gate2 *gate = to_clk_gate2(hw);
if (gate->share_count)
struct clk_gate2 *gate = to_clk_gate2(hw);
if (gate->share_count)
- return !!
(*gate->share_count
);
+ return !!
__clk_get_enable_count(hw->clk
);
else
return clk_gate2_reg_is_enabled(gate->reg, gate->bit_idx);
}
else
return clk_gate2_reg_is_enabled(gate->reg, gate->bit_idx);
}
@@
-127,10
+127,6
@@
struct clk *clk_register_gate2(struct device *dev, const char *name,
gate->bit_idx = bit_idx;
gate->flags = clk_gate2_flags;
gate->lock = lock;
gate->bit_idx = bit_idx;
gate->flags = clk_gate2_flags;
gate->lock = lock;
-
- /* Initialize share_count per hardware state */
- if (share_count)
- *share_count = clk_gate2_reg_is_enabled(reg, bit_idx) ? 1 : 0;
gate->share_count = share_count;
init.name = name;
gate->share_count = share_count;
init.name = name;