Skip to content

Commit

Permalink
mfd: Use the AB8500's IRQ domain to convert hwirq to virq
Browse files Browse the repository at this point in the history
Before the AB8500 had its own IRQ domain, the IRQ handler would take
the fired local IRQ (hwirq) and add it to the irq_base to convert it
to an IRQ number which Linux would understand (virq). However, the
IRQ base is not always used anymore since we can make use of Linear
domains. It's better to use the AB8500 hwirq -> virq mapping helper
function to convert them instead. That's what we do here.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Lee Jones authored and Samuel Ortiz committed Sep 18, 2012
1 parent 4adcefd commit 0a37fc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mfd/ab8500-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,9 @@ static irqreturn_t ab8500_irq(int irq, void *dev)
do {
int bit = __ffs(value);
int line = i * 8 + bit;
int virq = ab8500_irq_get_virq(ab8500, line);

handle_nested_irq(ab8500->irq_base + line);
handle_nested_irq(virq);
value &= ~(1 << bit);

} while (value);
Expand Down

0 comments on commit 0a37fc5

Please sign in to comment.