Skip to content

Commit

Permalink
mfd: htc-egpio: Cleanup interrupt handling
Browse files Browse the repository at this point in the history
Replace the open coded handler call with the prober accessor. Retrieve
the handler data from desc. That avoids a redundant lookup in the
sparse irq case.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Thomas Gleixner authored and Samuel Ortiz committed Mar 26, 2011
1 parent 73a6839 commit 77eda96
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/mfd/htc-egpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static struct irq_chip egpio_muxed_chip = {

static void egpio_handler(unsigned int irq, struct irq_desc *desc)
{
struct egpio_info *ei = get_irq_data(irq);
struct egpio_info *ei = irq_desc_get_handler_data(desc);
int irqpin;

/* Read current pins. */
Expand All @@ -113,9 +113,7 @@ static void egpio_handler(unsigned int irq, struct irq_desc *desc)
for_each_set_bit(irqpin, &readval, ei->nirqs) {
/* Run irq handler */
pr_debug("got IRQ %d\n", irqpin);
irq = ei->irq_start + irqpin;
desc = irq_to_desc(irq);
desc->handle_irq(irq, desc);
generic_handle_irq(ei->irq_start + irqpin);
}
}

Expand Down

0 comments on commit 77eda96

Please sign in to comment.