From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Subject: [patch 3/4] avr32: at32ap: Convert pop irq_chip to new functions
Date: Sun, 06 Feb 2011 16:30:37 -0000 [thread overview]
Message-ID: <20110206163009.190112353@linutronix.de> (raw)
In-Reply-To: <20110206162900.250401028@linutronix.de>
[-- Attachment #1: avr32-at32ap-pio-convert-irq-chip.patch --]
[-- Type: text/plain, Size: 2174 bytes --]
Also replace the open coded handler call with the proper wrapper.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/avr32/mach-at32ap/pio.c | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
Index: linux-next/arch/avr32/mach-at32ap/pio.c
===================================================================
--- linux-next.orig/arch/avr32/mach-at32ap/pio.c
+++ linux-next/arch/avr32/mach-at32ap/pio.c
@@ -249,23 +249,23 @@ static void gpio_set(struct gpio_chip *c
/* 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];
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];
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)
return -EINVAL;
@@ -275,20 +275,19 @@ static int gpio_irq_type(unsigned irq, u
static struct irq_chip gpio_irqchip = {
.name = "gpio",
- .mask = gpio_irq_mask,
- .unmask = gpio_irq_unmask,
- .set_type = gpio_irq_type,
+ .irq_mask = gpio_irq_mask,
+ .irq_unmask = gpio_irq_unmask,
+ .irq_set_type = gpio_irq_type,
};
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;
gpio_irq = (unsigned) get_irq_data(irq);
for (;;) {
u32 isr;
- struct irq_desc *d;
/* ack pending GPIO interrupts */
isr = pio_readl(pio, ISR) & pio_readl(pio, IMR);
@@ -301,9 +300,7 @@ static void gpio_irq_handler(unsigned ir
isr &= ~(1 << i);
i += gpio_irq;
- d = &irq_desc[i];
-
- d->handle_irq(i, d);
+ generic_handle_irq(i);
} while (isr);
}
}
next prev parent reply other threads:[~2011-02-06 16:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-06 16:30 [patch 0/4] avr32: Convert to new irq_chip functions Thomas Gleixner
2011-02-06 16:30 ` [patch 1/4] avr32: at32ap: Convert extint irq_chip to new functions Thomas Gleixner
2011-02-06 16:30 ` [patch 2/4] avr32: at32ap: Convert intc " Thomas Gleixner
2011-02-06 16:30 ` Thomas Gleixner [this message]
2011-02-06 16:30 ` [patch 4/4] avr32: Use generic IRQ config, enable GENERIC_HARDIRQS_NO_DEPRECATED Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110206163009.190112353@linutronix.de \
--to=tglx@linutronix.de \
--cc=hans-christian.egtvedt@atmel.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®