mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 22:24:09 +08:00
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>
This commit is contained in:
parent
54ee1471f8
commit
94b5c02882
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user