Commit a1f5f22a authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Linus Torvalds

gpio: timbgpio: irq_data conversion

Converts irq_chips and flow handlers over to the new struct irq_data based
irq_chip functions.
Signed-off-by: default avatarLennert Buytenhek <buytenh@secretlab.ca>
Cc: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 33fcc1b8
...@@ -109,10 +109,10 @@ static int timbgpio_to_irq(struct gpio_chip *gpio, unsigned offset) ...@@ -109,10 +109,10 @@ static int timbgpio_to_irq(struct gpio_chip *gpio, unsigned offset)
/* /*
* GPIO IRQ * GPIO IRQ
*/ */
static void timbgpio_irq_disable(unsigned irq) static void timbgpio_irq_disable(struct irq_data *d)
{ {
struct timbgpio *tgpio = get_irq_chip_data(irq); struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
int offset = irq - tgpio->irq_base; int offset = d->irq - tgpio->irq_base;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&tgpio->lock, flags); spin_lock_irqsave(&tgpio->lock, flags);
...@@ -121,10 +121,10 @@ static void timbgpio_irq_disable(unsigned irq) ...@@ -121,10 +121,10 @@ static void timbgpio_irq_disable(unsigned irq)
spin_unlock_irqrestore(&tgpio->lock, flags); spin_unlock_irqrestore(&tgpio->lock, flags);
} }
static void timbgpio_irq_enable(unsigned irq) static void timbgpio_irq_enable(struct irq_data *d)
{ {
struct timbgpio *tgpio = get_irq_chip_data(irq); struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
int offset = irq - tgpio->irq_base; int offset = d->irq - tgpio->irq_base;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&tgpio->lock, flags); spin_lock_irqsave(&tgpio->lock, flags);
...@@ -133,10 +133,10 @@ static void timbgpio_irq_enable(unsigned irq) ...@@ -133,10 +133,10 @@ static void timbgpio_irq_enable(unsigned irq)
spin_unlock_irqrestore(&tgpio->lock, flags); spin_unlock_irqrestore(&tgpio->lock, flags);
} }
static int timbgpio_irq_type(unsigned irq, unsigned trigger) static int timbgpio_irq_type(struct irq_data *d, unsigned trigger)
{ {
struct timbgpio *tgpio = get_irq_chip_data(irq); struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
int offset = irq - tgpio->irq_base; int offset = d->irq - tgpio->irq_base;
unsigned long flags; unsigned long flags;
u32 lvr, flr, bflr = 0; u32 lvr, flr, bflr = 0;
u32 ver; u32 ver;
...@@ -193,13 +193,13 @@ static int timbgpio_irq_type(unsigned irq, unsigned trigger) ...@@ -193,13 +193,13 @@ static int timbgpio_irq_type(unsigned irq, unsigned trigger)
return ret; return ret;
} }
static void timbgpio_irq(unsigned int irq, struct irq_desc *desc) static void timbgpio_irq(struct irq_data *d, struct irq_desc *desc)
{ {
struct timbgpio *tgpio = get_irq_data(irq); struct timbgpio *tgpio = irq_data_get_irq_data(d);
unsigned long ipr; unsigned long ipr;
int offset; int offset;
desc->chip->ack(irq); desc->irq_data.chip->ack(irq_get_irq_data(d));
ipr = ioread32(tgpio->membase + TGPIO_IPR); ipr = ioread32(tgpio->membase + TGPIO_IPR);
iowrite32(ipr, tgpio->membase + TGPIO_ICR); iowrite32(ipr, tgpio->membase + TGPIO_ICR);
...@@ -217,9 +217,9 @@ static void timbgpio_irq(unsigned int irq, struct irq_desc *desc) ...@@ -217,9 +217,9 @@ static void timbgpio_irq(unsigned int irq, struct irq_desc *desc)
static struct irq_chip timbgpio_irqchip = { static struct irq_chip timbgpio_irqchip = {
.name = "GPIO", .name = "GPIO",
.enable = timbgpio_irq_enable, .irq_enable = timbgpio_irq_enable,
.disable = timbgpio_irq_disable, .irq_disable = timbgpio_irq_disable,
.set_type = timbgpio_irq_type, .irq_set_type = timbgpio_irq_type,
}; };
static int __devinit timbgpio_probe(struct platform_device *pdev) static int __devinit timbgpio_probe(struct platform_device *pdev)
......
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