Commit f2f9c650 authored by Thomas Gleixner's avatar Thomas Gleixner

avr32: At32ap: Convert pop irq_chip to new functions

Also replace the open coded handler call with the proper wrapper.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
LKML-Reference: <20110206163009.190112353@linutronix.de>
parent 3972f691
...@@ -249,23 +249,23 @@ static void gpio_set(struct gpio_chip *chip, unsigned offset, int value) ...@@ -249,23 +249,23 @@ static void gpio_set(struct gpio_chip *chip, unsigned offset, int value)
/* GPIO IRQ support */ /* GPIO IRQ support */
static void gpio_irq_mask(unsigned irq) static void gpio_irq_mask(struct irq_data *d)
{ {
unsigned gpio = irq_to_gpio(irq); unsigned gpio = irq_to_gpio(d->irq);
struct pio_device *pio = &pio_dev[gpio >> 5]; struct pio_device *pio = &pio_dev[gpio >> 5];
pio_writel(pio, IDR, 1 << (gpio & 0x1f)); pio_writel(pio, IDR, 1 << (gpio & 0x1f));
} }
static void gpio_irq_unmask(unsigned irq) static void gpio_irq_unmask(struct irq_data *d))
{ {
unsigned gpio = irq_to_gpio(irq); unsigned gpio = irq_to_gpio(d->irq);
struct pio_device *pio = &pio_dev[gpio >> 5]; struct pio_device *pio = &pio_dev[gpio >> 5];
pio_writel(pio, IER, 1 << (gpio & 0x1f)); pio_writel(pio, IER, 1 << (gpio & 0x1f));
} }
static int gpio_irq_type(unsigned irq, unsigned type) static int gpio_irq_type(struct irq_data *d, unsigned type)
{ {
if (type != IRQ_TYPE_EDGE_BOTH && type != IRQ_TYPE_NONE) if (type != IRQ_TYPE_EDGE_BOTH && type != IRQ_TYPE_NONE)
return -EINVAL; return -EINVAL;
...@@ -275,20 +275,19 @@ static int gpio_irq_type(unsigned irq, unsigned type) ...@@ -275,20 +275,19 @@ static int gpio_irq_type(unsigned irq, unsigned type)
static struct irq_chip gpio_irqchip = { static struct irq_chip gpio_irqchip = {
.name = "gpio", .name = "gpio",
.mask = gpio_irq_mask, .irq_mask = gpio_irq_mask,
.unmask = gpio_irq_unmask, .irq_unmask = gpio_irq_unmask,
.set_type = gpio_irq_type, .irq_set_type = gpio_irq_type,
}; };
static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
{ {
struct pio_device *pio = get_irq_chip_data(irq); struct pio_device *pio = get_irq_desc_chip_data(desc);
unsigned gpio_irq; unsigned gpio_irq;
gpio_irq = (unsigned) get_irq_data(irq); gpio_irq = (unsigned) get_irq_data(irq);
for (;;) { for (;;) {
u32 isr; u32 isr;
struct irq_desc *d;
/* ack pending GPIO interrupts */ /* ack pending GPIO interrupts */
isr = pio_readl(pio, ISR) & pio_readl(pio, IMR); isr = pio_readl(pio, ISR) & pio_readl(pio, IMR);
...@@ -301,9 +300,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) ...@@ -301,9 +300,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
isr &= ~(1 << i); isr &= ~(1 << i);
i += gpio_irq; i += gpio_irq;
d = &irq_desc[i]; generic_handle_irq(i);
d->handle_irq(i, d);
} while (isr); } while (isr);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment