linux_old1/kernel/irq
Uwe Kleine-König 82736f4d1d generic irqs: handle failure of irqchip->set_type in setup_irq
set_type returns an int indicating success or failure, but up to now
setup_irq ignores that.

In my case this resulted in a machine hang:

gpio-keys requested IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, but
arm/ns9xxx can only trigger on one direction so set_type didn't touch
the configuration which happens do default to a level sensitiveness and
returned -EINVAL.  setup_irq ignored that and unmasked the irq.  This
resulted in an endless triggering of the gpio-key interrupt service
routine which effectively killed the machine.

With this patch applied setup_irq propagates the error to the caller.

Note that before in the case

	chip && !chip->set_type && !chip->name

a NULL pointer was feed to printk.  This is fixed, too.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:24 -07:00
..
Makefile [PATCH] sort the devres mess out 2007-02-11 11:18:07 -08:00
autoprobe.c [PATCH] genirq: add handle_bad_irq() 2006-06-29 10:26:24 -07:00
chip.c cpumask: Cleanup more uses of CPU_MASK and NODE_MASK 2008-04-19 19:44:58 +02:00
devres.c kernel: explicitly include required header files under kernel/ 2008-04-29 08:06:04 -07:00
handle.c kernel: remove fastcall in kernel/* 2008-02-08 09:22:31 -08:00
internals.h [PATCH] genirq: more verbose debugging on unexpected IRQ vectors 2006-06-29 10:26:25 -07:00
manage.c generic irqs: handle failure of irqchip->set_type in setup_irq 2008-07-24 10:47:24 -07:00
migration.c [PATCH] genirq: Mask irqs when migrating them. 2007-02-26 10:34:08 -08:00
proc.c genirq: Expose default irq affinity mask (take 3) 2008-06-05 15:18:30 +02:00
resend.c genirq: suppress resend of level interrupts 2007-08-12 11:05:45 -07:00
spurious.c genirq: reenable a nobody cared disabled irq when a new driver arrives 2008-05-02 13:40:34 +02:00