diff options
author | Shawn Guo <shawn.guo@freescale.com> | 2014-04-18 16:07:44 +0800 |
---|---|---|
committer | Shawn Guo <shawn.guo@freescale.com> | 2014-05-12 22:58:48 +0800 |
commit | 94b5c0288299c7b962a7e2cb734293b77b96cffe (patch) | |
tree | d23e09238651af8d4500f961e549eedd832f39ce /arch/arm/mach-imx/clk-gate2.c | |
parent | 54ee1471f82047885ec575559cb7c8466adcbef4 (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>
Diffstat (limited to 'arch/arm/mach-imx/clk-gate2.c')
-rw-r--r-- | arch/arm/mach-imx/clk-gate2.c | 12 |
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 7e98ccb8fa9..0803df9d9c7 100644 --- a/arch/arm/mach-imx/clk-gate2.c +++ b/arch/arm/mach-imx/clk-gate2.c @@ -43,15 +43,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; } @@ -62,15 +60,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) |