Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94b5c028 authored by Shawn Guo's avatar Shawn Guo
Browse files

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: default avatarShawn Guo <shawn.guo@freescale.com>
parent 54ee1471
Loading
Loading
Loading
Loading
+4 −8
Original line number Original line Diff line number Diff line
@@ -43,14 +43,12 @@ static int clk_gate2_enable(struct clk_hw *hw)
	u32 reg;
	u32 reg;
	unsigned long flags = 0;
	unsigned long flags = 0;


	if (gate->lock)
	spin_lock_irqsave(gate->lock, flags);
	spin_lock_irqsave(gate->lock, flags);


	reg = readl(gate->reg);
	reg = readl(gate->reg);
	reg |= 3 << gate->bit_idx;
	reg |= 3 << gate->bit_idx;
	writel(reg, gate->reg);
	writel(reg, gate->reg);


	if (gate->lock)
	spin_unlock_irqrestore(gate->lock, flags);
	spin_unlock_irqrestore(gate->lock, flags);


	return 0;
	return 0;
@@ -62,14 +60,12 @@ static void clk_gate2_disable(struct clk_hw *hw)
	u32 reg;
	u32 reg;
	unsigned long flags = 0;
	unsigned long flags = 0;


	if (gate->lock)
	spin_lock_irqsave(gate->lock, flags);
	spin_lock_irqsave(gate->lock, flags);


	reg = readl(gate->reg);
	reg = readl(gate->reg);
	reg &= ~(3 << gate->bit_idx);
	reg &= ~(3 << gate->bit_idx);
	writel(reg, gate->reg);
	writel(reg, gate->reg);


	if (gate->lock)
	spin_unlock_irqrestore(gate->lock, flags);
	spin_unlock_irqrestore(gate->lock, flags);
}
}