diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2012-11-18 11:39:32 -0500 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2012-11-21 13:28:25 -0500 |
commit | d356cf5a74afa32b40decca3c9dd88bc3cd63eb5 (patch) | |
tree | c129e0e195c3d899a164724bf7d9b242d2093bbd /arch/arm | |
parent | 5d3df935426271016b895aecaa247101b4bfa35e (diff) |
Dove: Fix irq_to_pmu()
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 <rmk+kernel@arm.linux.org.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-dove/include/mach/pm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-dove/include/mach/pm.h b/arch/arm/mach-dove/include/mach/pm.h index 7bcd0dfce4b1..b47f75038686 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) | |||
63 | 63 | ||
64 | static inline int irq_to_pmu(int irq) | 64 | static inline int irq_to_pmu(int irq) |
65 | { | 65 | { |
66 | if (IRQ_DOVE_PMU_START < irq && irq < NR_IRQS) | 66 | if (IRQ_DOVE_PMU_START <= irq && irq < NR_IRQS) |
67 | return irq - IRQ_DOVE_PMU_START; | 67 | return irq - IRQ_DOVE_PMU_START; |
68 | 68 | ||
69 | return -EINVAL; | 69 | return -EINVAL; |