summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@freescale.com>2014-04-19 13:01:31 +0800
committerNicolin Chen <Guangyu.Chen@freescale.com>2014-04-23 17:00:06 +0800
commitb3caae4778599bbbf77e188082d2c3e2da33688f (patch)
tree6741f7447f9d3ae19d520921f5e8e370ef0f43f7
parentc01fcf9c5d5aab969487b4960c0b40a2273b14c9 (diff)
ARM: imx: lock is always valid for clk_gate2
The imx specific clk_gate2 always has a valid lock with the clock. So the validation on gate->lock is not really needed. Remove it. Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 430468ff84e8d8a8d53e3ca974721edd85042d47)
-rw-r--r--arch/arm/mach-imx/clk-gate2.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/arm/mach-imx/clk-gate2.c b/arch/arm/mach-imx/clk-gate2.c
index a7857a9dd866..96bbc7082d3a 100644
--- a/arch/arm/mach-imx/clk-gate2.c
+++ b/arch/arm/mach-imx/clk-gate2.c
@@ -44,15 +44,13 @@ static int clk_gate2_enable(struct clk_hw *hw)
u32 reg;
unsigned long flags = 0;
- if (gate->lock)
- spin_lock_irqsave(gate->lock, flags);
+ spin_lock_irqsave(gate->lock, flags);
reg = readl(gate->reg);
reg |= 3 << gate->bit_idx;
writel(reg, gate->reg);
- if (gate->lock)
- spin_unlock_irqrestore(gate->lock, flags);
+ spin_unlock_irqrestore(gate->lock, flags);
return 0;
}
@@ -63,15 +61,13 @@ static void clk_gate2_disable(struct clk_hw *hw)
u32 reg;
unsigned long flags = 0;
- if (gate->lock)
- spin_lock_irqsave(gate->lock, flags);
+ spin_lock_irqsave(gate->lock, flags);
reg = readl(gate->reg);
reg &= ~(3 << gate->bit_idx);
writel(reg, gate->reg);
- if (gate->lock)
- spin_unlock_irqrestore(gate->lock, flags);
+ spin_unlock_irqrestore(gate->lock, flags);
}
static int clk_gate2_is_enabled(struct clk_hw *hw)