Skip to content

Commit

Permalink
gpio: pl061: use chained_irq_* functions in irq handler
Browse files Browse the repository at this point in the history
Use chained_irq_enter/exit helper functions instead of direct pointer
accesses. This is needed for generic irq chip conversion.

Signed-off-by: Rob Herring <[email protected]>
Acked-by: Grant Likely <[email protected]>
Cc: Linus Walleij <[email protected]>
  • Loading branch information
Rob Herring committed Jan 4, 2012
1 parent 5f0a6e2 commit dece904
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/gpio/gpio-pl061.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/amba/bus.h>
#include <linux/amba/pl061.h>
#include <linux/slab.h>
#include <asm/mach/irq.h>

#define GPIODIR 0x400
#define GPIOIS 0x404
Expand Down Expand Up @@ -211,8 +212,9 @@ static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
struct list_head *chip_list = irq_get_handler_data(irq);
struct list_head *ptr;
struct pl061_gpio *chip;
struct irq_chip *irqchip = irq_desc_get_chip(desc);

desc->irq_data.chip->irq_ack(&desc->irq_data);
chained_irq_enter(irqchip, desc);
list_for_each(ptr, chip_list) {
unsigned long pending;
int offset;
Expand All @@ -227,7 +229,7 @@ static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
for_each_set_bit(offset, &pending, PL061_GPIO_NR)
generic_handle_irq(pl061_to_irq(&chip->gc, offset));
}
desc->irq_data.chip->irq_unmask(&desc->irq_data);
chained_irq_exit(irqchip, desc);
}

static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
Expand Down

0 comments on commit dece904

Please sign in to comment.