Skip to content

Commit

Permalink
Dove: Fix irq_to_pmu()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King - ARM Linux authored and Jason Cooper committed Nov 21, 2012
1 parent 5d3df93 commit d356cf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-dove/include/mach/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d356cf5

Please sign in to comment.