Skip to contentSkip to conversation

mach-omap2: Change if statement in omap2_dflt_clk_enable

PATCH In review Nicholas Krause 2 participants 2 messages Jul 4, 2014 – Jul 5, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mach-omap2: Change if statement in omap2_dflt_clk_enable

This patch changes this function to check for if v is returning value from the called function. If not it does the else. Furthermore fixes the FIXME message above if statement for holding INVERT_ENABLE bit when not needing to be checked for in if statement by just checking for if v is not Null.

---
 arch/arm/mach-omap2/clock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/clock.c +1 -1
index 591581a..626363d 100644
@@ -379,7 +379,7 @@ void omap2_dflt_clk_disable(struct clk_hw *hw)
 	}
 
 	v = omap2_clk_readl(clk, clk->enable_reg);
-	if (clk->flags & INVERT_ENABLE)
+	if (v)
 		v |= (1 << clk->enable_bit);
 	else
 		v &= ~(1 << clk->enable_bit);
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 6 lines · Nicholas Krause

This patch changes this function to check for if v is returning value from the called function. If not it does the else. Furthermore fixes the FIXME message above if statement for holding INVERT_ENABLE bit when not needing to be checked for in if statement by just checking for if v is not Null.

This patch doesn't make any sense. Neither does the commit message. Please explain exactly what this patch is intended to do in terms of the clock framework or the hardware.

- Paul

Quoted 20 lines
---
 arch/arm/mach-omap2/clock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/clock.c +1 -1
index 591581a..626363d 100644
@@ -379,7 +379,7 @@ void omap2_dflt_clk_disable(struct clk_hw *hw)
 	}
 
 	v = omap2_clk_readl(clk, clk->enable_reg);
-	if (clk->flags & INVERT_ENABLE)
+	if (v)
 		v |= (1 << clk->enable_bit);
 	else
 		v &= ~(1 << clk->enable_bit);
Signature · 1 line
1.9.1

- Paul