Thread (100 messages) 100 messages, 5 authors, 2012-12-09

[ 76/89] Dove: Fix irq_to_pmu()

From: Ben Hutchings <hidden>
Date: 2012-12-03 14:52:59
Also in: lkml
Subsystem: arm port, arm/marvell dove/mv78xx0/orion soc support, the rest · Maintainers: Russell King, Andrew Lunn, Sebastian Hesselbarth, Gregory Clement, Linus Torvalds

3.2-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Russell King - ARM Linux <redacted>

commit d356cf5a74afa32b40decca3c9dd88bc3cd63eb5 upstream.

PMU interrupts start at IRQ_DOVE_PMU_START, not IRQ_DOVE_PMU_START + 1.
Fix the condition.  (It may have been less likely to occur had the code
been written "if (irq >= IRQ_DOVE_PMU_START" which imho is the easier
to understand notation, and matches the normal way of thinking about
these things.)

Signed-off-by: Russell King <redacted>
Signed-off-by: Jason Cooper <redacted>
Signed-off-by: Ben Hutchings <redacted>
---
 arch/arm/mach-dove/include/mach/pm.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-dove/include/mach/pm.h b/arch/arm/mach-dove/include/mach/pm.h
index 7bcd0df..b47f750 100644
--- a/arch/arm/mach-dove/include/mach/pm.h
+++ b/arch/arm/mach-dove/include/mach/pm.h
@@ -63,7 +63,7 @@ static inline int pmu_to_irq(int pin)
 
 static inline int irq_to_pmu(int irq)
 {
-	if (IRQ_DOVE_PMU_START < irq && irq < NR_IRQS)
+	if (IRQ_DOVE_PMU_START <= irq && irq < NR_IRQS)
 		return irq - IRQ_DOVE_PMU_START;
 
 	return -EINVAL;

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help