lkml.org 
[lkml]   [2009]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:irq/genirq] genirq: do not execute DEBUG_SHIRQ when irq setup failed
Commit-ID:  ba71604fad348656071a2a76eef9a67dab85a773
Gitweb: http://git.kernel.org/tip/ba71604fad348656071a2a76eef9a67dab85a773
Author: Luis Henriques <henrix@sapo.pt>
AuthorDate: Wed, 1 Apr 2009 18:06:35 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 2 Apr 2009 16:02:39 +0200

genirq: do not execute DEBUG_SHIRQ when irq setup failed

When requesting an IRQ, the DEBUG_SHIRQ code executes a fake IRQ just to make
sure the driver is ready to receive an IRQ immediately. The problem was that
this fake IRQ was being executed even if interrupt line failed to be allocated
by __setup_irq.

Signed-off-by: Luis Henriques <henrix@sapo.pt>
LKML-Reference: <20090401170635.GA4392@hades.domain.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


---
kernel/irq/manage.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 1516ab7..beeb7d1 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -768,7 +768,7 @@ int request_irq(unsigned int irq, irq_handler_t handler,
kfree(action);

#ifdef CONFIG_DEBUG_SHIRQ
- if (irqflags & IRQF_SHARED) {
+ if (!retval & (irqflags & IRQF_SHARED)) {
/*
* It's a shared IRQ -- the driver ought to be prepared for it
* to happen immediately, so let's make sure....

\
 
 \ /
  Last update: 2009-04-02 16:07    [W:1.676 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site