From a1f5f22adc3206c47e70652c12671666c65b579f Mon Sep 17 00:00:00 2001 From: Lennert Buytenhek Date: Wed, 12 Jan 2011 17:00:19 -0800 Subject: [PATCH] gpio: timbgpio: irq_data conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Converts irq_chips and flow handlers over to the new struct irq_data based irq_chip functions. Signed-off-by: Lennert Buytenhek Cc: Richard Röjfors Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/gpio/timbgpio.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/gpio/timbgpio.c b/drivers/gpio/timbgpio.c index 45293662e950..349131eb1ce0 100644 --- a/drivers/gpio/timbgpio.c +++ b/drivers/gpio/timbgpio.c @@ -109,10 +109,10 @@ static int timbgpio_to_irq(struct gpio_chip *gpio, unsigned offset) /* * 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); - int offset = irq - tgpio->irq_base; + struct timbgpio *tgpio = irq_data_get_irq_chip_data(d); + int offset = d->irq - tgpio->irq_base; unsigned long flags; spin_lock_irqsave(&tgpio->lock, flags); @@ -121,10 +121,10 @@ static void timbgpio_irq_disable(unsigned irq) 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); - int offset = irq - tgpio->irq_base; + struct timbgpio *tgpio = irq_data_get_irq_chip_data(d); + int offset = d->irq - tgpio->irq_base; unsigned long flags; spin_lock_irqsave(&tgpio->lock, flags); @@ -133,10 +133,10 @@ static void timbgpio_irq_enable(unsigned irq) 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); - int offset = irq - tgpio->irq_base; + struct timbgpio *tgpio = irq_data_get_irq_chip_data(d); + int offset = d->irq - tgpio->irq_base; unsigned long flags; u32 lvr, flr, bflr = 0; u32 ver; @@ -193,13 +193,13 @@ static int timbgpio_irq_type(unsigned irq, unsigned trigger) 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; int offset; - desc->chip->ack(irq); + desc->irq_data.chip->ack(irq_get_irq_data(d)); ipr = ioread32(tgpio->membase + TGPIO_IPR); iowrite32(ipr, tgpio->membase + TGPIO_ICR); @@ -217,9 +217,9 @@ static void timbgpio_irq(unsigned int irq, struct irq_desc *desc) static struct irq_chip timbgpio_irqchip = { .name = "GPIO", - .enable = timbgpio_irq_enable, - .disable = timbgpio_irq_disable, - .set_type = timbgpio_irq_type, + .irq_enable = timbgpio_irq_enable, + .irq_disable = timbgpio_irq_disable, + .irq_set_type = timbgpio_irq_type, }; static int __devinit timbgpio_probe(struct platform_device *pdev) -- GitLab