aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@freescale.com>2014-04-18 04:07:44 -0400
committerShawn Guo <shawn.guo@freescale.com>2014-05-12 10:58:48 -0400
commit94b5c0288299c7b962a7e2cb734293b77b96cffe (patch)
treed23e09238651af8d4500f961e549eedd832f39ce /arch/arm/mach-imx
parent54ee1471f82047885ec575559cb7c8466adcbef4 (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')
-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 7e98ccb8fa91..0803df9d9c7e 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)
43 u32 reg; 43 u32 reg;
44 unsigned long flags = 0; 44 unsigned long flags = 0;
45 45
46 if (gate->lock) 46 spin_lock_irqsave(gate->lock, flags);
47 spin_lock_irqsave(gate->lock, flags);
48 47
49 reg = readl(gate->reg); 48 reg = readl(gate->reg);
50 reg |= 3 << gate->bit_idx; 49 reg |= 3 << gate->bit_idx;
51 writel(reg, gate->reg); 50 writel(reg, gate->reg);
52 51
53 if (gate->lock) 52 spin_unlock_irqrestore(gate->lock, flags);
54 spin_unlock_irqrestore(gate->lock, flags);
55 53
56 return 0; 54 return 0;
57} 55}
@@ -62,15 +60,13 @@ static void clk_gate2_disable(struct clk_hw *hw)
62 u32 reg; 60 u32 reg;
63 unsigned long flags = 0; 61 unsigned long flags = 0;
64 62
65 if (gate->lock) 63 spin_lock_irqsave(gate->lock, flags);
66 spin_lock_irqsave(gate->lock, flags);
67 64
68 reg = readl(gate->reg); 65 reg = readl(gate->reg);
69 reg &= ~(3 << gate->bit_idx); 66 reg &= ~(3 << gate->bit_idx);
70 writel(reg, gate->reg); 67 writel(reg, gate->reg);
71 68
72 if (gate->lock) 69 spin_unlock_irqrestore(gate->lock, flags);
73 spin_unlock_irqrestore(gate->lock, flags);
74} 70}
75 71
76static int clk_gate2_is_enabled(struct clk_hw *hw) 72static int clk_gate2_is_enabled(struct clk_hw *hw)