3.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ben Hutchings <b...@decadent.org.uk>

commit 2779db8d37d4b542d9ca2575f5f178dbeaca6c86 upstream.

Commit 02725e7471b8 ('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 <bjarn...@rhi.hi.is>
Tested-by: Bjarni Ingi Gislason <bjarn...@rhi.hi.is> (against 3.2)
Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
Cc: 709...@bugs.debian.org
Link: http://bugs.debian.org/709647
Link: 
http://lkml.kernel.org/r/1372383630.23847.40.ca...@deadeye.wl.decadent.org.uk
Signed-off-by: Thomas Gleixner <t...@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
 kernel/irq/manage.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -555,9 +555,9 @@ int can_request_irq(unsigned int irq, un
                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;


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130719052049.063069...@linuxfoundation.org

Reply via email to