mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
genirq: Fix can_request_irq() for IRQs without an action
commit2779db8d37upstream. Commit02725e7471('genirq: Use irq_get/put functions'), inadvertently changed can_request_irq() to return 0 for IRQs that have no action. This causes pcibios_lookup_irq() to select only IRQs that already have an action with IRQF_SHARED set, or to fail if there are none. Change can_request_irq() to return 1 for IRQs that have no action (if the first two conditions are met). Reported-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is> Tested-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is> (against 3.2) Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: 709647@bugs.debian.org Link: http://bugs.debian.org/709647 Link: http://lkml.kernel.org/r/1372383630.23847.40.camel@deadeye.wl.decadent.org.uk Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9ceb896c67
commit
3dc8601b54
|
|
@ -555,9 +555,9 @@ int can_request_irq(unsigned int irq, unsigned long irqflags)
|
|||
return 0;
|
||||
|
||||
if (irq_settings_can_request(desc)) {
|
||||
if (desc->action)
|
||||
if (irqflags & desc->action->flags & IRQF_SHARED)
|
||||
canrequest =1;
|
||||
if (!desc->action ||
|
||||
irqflags & desc->action->flags & IRQF_SHARED)
|
||||
canrequest = 1;
|
||||
}
|
||||
irq_put_desc_unlock(desc, flags);
|
||||
return canrequest;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user