aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-stmp3xxx/pinmux.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-29 13:46:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-29 13:46:15 -0400
commitc86defc82c18b648193b5c6aabcc6204fd6bb373 (patch)
tree1ef70cfa56f5f9a123d0db6fefe4c434c12bd6c6 /arch/arm/plat-stmp3xxx/pinmux.c
parent1309d7afbed112f0e8e90be9af975550caa0076b (diff)
parent9ad198cba2a8177eea6a7f2f0202b910abdef96b (diff)
Merge branch 'irq-final-for-linus-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-final-for-linus-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (111 commits) gpio: ab8500: Mark broken genirq: Remove move_*irq leftovers genirq: Remove compat code drivers: Final irq namespace conversion mn10300: Use generic show_interrupts() mn10300: Cleanup irq_desc access mn10300: Convert genirq namespace frv: Use generic show_interrupts() frv: Convert genirq namespace frv: Select GENERIC_HARDIRQS_NO_DEPRECATED frv: Convert cpu irq_chip to new functions frv: Convert mb93493 irq_chip to new functions frv: Convert mb93093 irq_chip to new function frv: Convert mb93091 irq_chip to new functions frv: Fix typo from __do_IRQ overhaul frv: Remove stale irq_chip.end m68k: Convert irq function namespace xen: Use new irq_move functions xen: Cleanup genirq namespace unicore32: Use generic show_interrupts() ...
Diffstat (limited to 'arch/arm/plat-stmp3xxx/pinmux.c')
-rw-r--r--arch/arm/plat-stmp3xxx/pinmux.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/arm/plat-stmp3xxx/pinmux.c b/arch/arm/plat-stmp3xxx/pinmux.c
index 66d5bac3ace2..3def03b3217d 100644
--- a/arch/arm/plat-stmp3xxx/pinmux.c
+++ b/arch/arm/plat-stmp3xxx/pinmux.c
@@ -489,14 +489,13 @@ static void stmp3xxx_gpio_free(struct gpio_chip *chip, unsigned offset)
489 489
490static void stmp3xxx_gpio_irq(u32 irq, struct irq_desc *desc) 490static void stmp3xxx_gpio_irq(u32 irq, struct irq_desc *desc)
491{ 491{
492 struct stmp3xxx_pinmux_bank *pm = get_irq_data(irq); 492 struct stmp3xxx_pinmux_bank *pm = irq_get_handler_data(irq);
493 int gpio_irq = pm->virq; 493 int gpio_irq = pm->virq;
494 u32 stat = __raw_readl(pm->irqstat); 494 u32 stat = __raw_readl(pm->irqstat);
495 495
496 while (stat) { 496 while (stat) {
497 if (stat & 1) 497 if (stat & 1)
498 irq_desc[gpio_irq].handle_irq(gpio_irq, 498 generic_handle_irq(gpio_irq);
499 &irq_desc[gpio_irq]);
500 gpio_irq++; 499 gpio_irq++;
501 stat >>= 1; 500 stat >>= 1;
502 } 501 }
@@ -534,15 +533,15 @@ int __init stmp3xxx_pinmux_init(int virtual_irq_start)
534 533
535 for (virq = pm->virq; virq < pm->virq; virq++) { 534 for (virq = pm->virq; virq < pm->virq; virq++) {
536 gpio_irq_chip.irq_mask(irq_get_irq_data(virq)); 535 gpio_irq_chip.irq_mask(irq_get_irq_data(virq));
537 set_irq_chip(virq, &gpio_irq_chip); 536 irq_set_chip_and_handler(virq, &gpio_irq_chip,
538 set_irq_handler(virq, handle_level_irq); 537 handle_level_irq);
539 set_irq_flags(virq, IRQF_VALID); 538 set_irq_flags(virq, IRQF_VALID);
540 } 539 }
541 r = gpiochip_add(&pm->chip); 540 r = gpiochip_add(&pm->chip);
542 if (r < 0) 541 if (r < 0)
543 break; 542 break;
544 set_irq_chained_handler(pm->irq, stmp3xxx_gpio_irq); 543 irq_set_chained_handler(pm->irq, stmp3xxx_gpio_irq);
545 set_irq_data(pm->irq, pm); 544 irq_set_handler_data(pm->irq, pm);
546 } 545 }
547 return r; 546 return r;
548} 547}