From: eha@doredevelopment.dk
To: linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, grant.likely@secretlab.ca,
Esben Haabendal <eha@doredevelopment.dk>
Subject: [PATCH] Support IRQ_NOAUTOEN flag in set_irq_chained_handler()
Date: Fri, 18 Mar 2011 09:03:09 +0100 [thread overview]
Message-ID: <1300435389-11048-1-git-send-email-eha@doredevelopment.dk> (raw)
From: Esben Haabendal <eha@doredevelopment.dk>
Handle IRQ_NOAUTOEN in __set_irq_handler() (ie. for
set_irq_chained_handler()) instead of just silently ignoring it, and in
the same way as is done in __setup_irq() (ie. request_irq()).
This give a more consistent interface, and also adheres better to
the rule of least surprise.
Signed-off-by: Esben Haabendal <eha@doredevelopment.dk>
---
kernel/irq/chip.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index baa5c4a..5594b17 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -731,10 +731,13 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
desc->name = name;
if (handle != handle_bad_irq && is_chained) {
- desc->status &= ~IRQ_DISABLED;
desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE;
- desc->depth = 0;
- desc->irq_data.chip->irq_startup(&desc->irq_data);
+ if (!(desc->status & IRQ_NOAUTOEN)) {
+ desc->depth = 0;
+ desc->status &= ~IRQ_DISABLED;
+ desc->irq_data.chip->irq_startup(&desc->irq_data);
+ } else
+ desc->depth = 1;
}
raw_spin_unlock_irqrestore(&desc->lock, flags);
chip_bus_sync_unlock(desc);
--
1.7.1
next reply other threads:[~2011-03-18 8:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-18 8:03 eha [this message]
2011-03-18 20:39 ` Thomas Gleixner
2011-03-22 9:05 ` Esben Haabendal
2011-03-22 11:17 ` Thomas Gleixner
2011-03-22 12:38 ` Esben Haabendal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1300435389-11048-1-git-send-email-eha@doredevelopment.dk \
--to=eha@doredevelopment.dk \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome