diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-03-24 11:46:22 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-03-24 12:15:23 +0100 |
commit | f48fe81e5b032914183e9a17052313720c2cac56 (patch) | |
tree | 9404047368387a6f8b39b4a822ef28e18eba45e9 /kernel/irq/manage.c | |
parent | 935bd5b971f0df7c06d214d022cf8392e2f37952 (diff) | |
download | kernel_samsung_smdk4412-f48fe81e5b032914183e9a17052313720c2cac56.zip kernel_samsung_smdk4412-f48fe81e5b032914183e9a17052313720c2cac56.tar.gz kernel_samsung_smdk4412-f48fe81e5b032914183e9a17052313720c2cac56.tar.bz2 |
genirq: threaded irq handlers review fixups
Delta patch to address the review comments.
- Implement warning when IRQ_WAKE_THREAD is requested and no
thread handler installed
- coding style fixes
Pointed-out-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r-- | kernel/irq/manage.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index a4c1ab8..a3eb7ba 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -407,20 +407,17 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned int irq, return ret; } -static inline int irq_thread_should_run(struct irqaction *action) -{ - return test_and_clear_bit(IRQTF_RUNTHREAD, &action->thread_flags); -} - static int irq_wait_for_interrupt(struct irqaction *action) { while (!kthread_should_stop()) { set_current_state(TASK_INTERRUPTIBLE); - if (irq_thread_should_run(action)) { + + if (test_and_clear_bit(IRQTF_RUNTHREAD, + &action->thread_flags)) { __set_current_state(TASK_RUNNING); return 0; - } else - schedule(); + } + schedule(); } return -1; } @@ -820,8 +817,8 @@ EXPORT_SYMBOL(free_irq); * @irq: Interrupt line to allocate * @handler: Function to be called when the IRQ occurs. * Primary handler for threaded interrupts - * @thread_fn: Function called from the irq handler thread - * If NULL, no irq thread is created + * @thread_fn: Function called from the irq handler thread + * If NULL, no irq thread is created * @irqflags: Interrupt type flags * @devname: An ascii name for the claiming device * @dev_id: A cookie passed back to the handler function |