diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-21 21:38:26 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-21 21:38:26 (GMT) |
commit | 0f5c2ac58f22fd41deaeeb45ee752d4ae55f0d01 (patch) | |
tree | 6e13ef4d7247e53d7a0f18e04549a8847cc80214 /arch/h8300/kernel/irq.c | |
parent | cfd74486eace27a0899b30529d01bc1a09a5b973 (diff) | |
parent | dfff95c394b0dd977a6b65bd52b99703fae94d9b (diff) | |
download | linux-0f5c2ac58f22fd41deaeeb45ee752d4ae55f0d01.tar.xz |
Merge branch 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (37 commits)
um: Use generic irq Kconfig
tile: Use generic irq Kconfig
sparc: Use generic irq Kconfig
score: Use generic irq Kconfig
powerpc: Use generic irq Kconfig
parisc: Use generic irq Kconfig
mn10300: Use generic irq Kconfig
microblaze: Use generic irq Kconfig
m68knommu: Use generic irq Kconfig
ia64: Use generic irq Kconfig
frv: Use generic irq Kconfig
blackfin: Use generic irq Kconfig
alpha: Use generic irq Kconfig
genirq: Remove __do_IRQ
m32r: Convert to generic irq Kconfig
m32r: Convert usrv platform irq handling
m32r: Convert opsput_lcdpld irq chip
m32r: Convert opsput lanpld irq chip
m32r: Convert opsput pld irq chip
m32r: Convert opsput irq chip
...
Diffstat (limited to 'arch/h8300/kernel/irq.c')
-rw-r--r-- | arch/h8300/kernel/irq.c | 50 |
1 files changed, 20 insertions, 30 deletions
diff --git a/arch/h8300/kernel/irq.c b/arch/h8300/kernel/irq.c index c25dc2c..7643d39 100644 --- a/arch/h8300/kernel/irq.c +++ b/arch/h8300/kernel/irq.c @@ -38,34 +38,30 @@ static inline int is_ext_irq(unsigned int irq) return (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS)); } -static void h8300_enable_irq(unsigned int irq) +static void h8300_enable_irq(struct irq_data *data) { - if (is_ext_irq(irq)) - IER_REGS |= 1 << (irq - EXT_IRQ0); + if (is_ext_irq(data->irq)) + IER_REGS |= 1 << (data->irq - EXT_IRQ0); } -static void h8300_disable_irq(unsigned int irq) +static void h8300_disable_irq(struct irq_data *data) { - if (is_ext_irq(irq)) - IER_REGS &= ~(1 << (irq - EXT_IRQ0)); + if (is_ext_irq(data->irq)) + IER_REGS &= ~(1 << (data->irq - EXT_IRQ0)); } -static void h8300_end_irq(unsigned int irq) +static unsigned int h8300_startup_irq(struct irq_data *data) { -} - -static unsigned int h8300_startup_irq(unsigned int irq) -{ - if (is_ext_irq(irq)) - return h8300_enable_irq_pin(irq); + if (is_ext_irq(data->irq)) + return h8300_enable_irq_pin(data->irq); else return 0; } -static void h8300_shutdown_irq(unsigned int irq) +static void h8300_shutdown_irq(struct irq_data *data) { - if (is_ext_irq(irq)) - h8300_disable_irq_pin(irq); + if (is_ext_irq(data->irq)) + h8300_disable_irq_pin(data->irq); } /* @@ -73,12 +69,10 @@ static void h8300_shutdown_irq(unsigned int irq) */ struct irq_chip h8300irq_chip = { .name = "H8300-INTC", - .startup = h8300_startup_irq, - .shutdown = h8300_shutdown_irq, - .enable = h8300_enable_irq, - .disable = h8300_disable_irq, - .ack = NULL, - .end = h8300_end_irq, + .irq_startup = h8300_startup_irq, + .irq_shutdown = h8300_shutdown_irq, + .irq_enable = h8300_enable_irq, + .irq_disable = h8300_disable_irq, }; #if defined(CONFIG_RAMKERNEL) @@ -160,18 +154,14 @@ void __init init_IRQ(void) setup_vector(); - for (c = 0; c < NR_IRQS; c++) { - irq_desc[c].status = IRQ_DISABLED; - irq_desc[c].action = NULL; - irq_desc[c].depth = 1; - irq_desc[c].chip = &h8300irq_chip; - } + for (c = 0; c < NR_IRQS; c++) + set_irq_chip_and_handler(c, &h8300irq_chip, handle_simple_irq); } asmlinkage void do_IRQ(int irq) { irq_enter(); - __do_IRQ(irq); + generic_handle_irq(irq); irq_exit(); } @@ -192,7 +182,7 @@ int show_interrupts(struct seq_file *p, void *v) goto unlock; seq_printf(p, "%3d: ",i); seq_printf(p, "%10u ", kstat_irqs(i)); - seq_printf(p, " %14s", irq_desc[i].chip->name); + seq_printf(p, " %14s", irq_desc[i].irq_data.chip->name); seq_printf(p, "-%-8s", irq_desc[i].name); seq_printf(p, " %s", action->name); |