diff options
author | Pawel MOLL <pawel.moll@st.com> | 2008-09-01 05:12:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-06 14:36:38 -0400 |
commit | 7e6e178ab1548c8d894a77593e757acf4510b8ba (patch) | |
tree | 1bbebd67a2a80573f277e39e7746c2d9c19dfcf4 /kernel/irq | |
parent | 377bf1e4ac2d894791733270604594c7c851ef83 (diff) |
genirq: irq_chip->startup() usage in setup_irq and set_irq_chained handler
This patch clarifies usage of irq_chip->startup() callback:
1. The "if (startup) startup(); else enabled();" code in setup_irq()
is unnecessary, as startup() falls back to enabled() via
default callbacks, set by irq_chip_set_defaults().
2. When using set_irq_chained_handler() the startup() was never called,
which is not good at all... Fixed. And again - when startup() is not
defined the call will fall back to enable() than to unmask() via
default callbacks.
Signed-off-by: Pawel Moll <pawel.moll@st.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/chip.c | 2 | ||||
-rw-r--r-- | kernel/irq/manage.c | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 964964baefa2..240c64d59267 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -587,7 +587,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | |||
587 | desc->status &= ~IRQ_DISABLED; | 587 | desc->status &= ~IRQ_DISABLED; |
588 | desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE; | 588 | desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE; |
589 | desc->depth = 0; | 589 | desc->depth = 0; |
590 | desc->chip->unmask(irq); | 590 | desc->chip->startup(irq); |
591 | } | 591 | } |
592 | spin_unlock_irqrestore(&desc->lock, flags); | 592 | spin_unlock_irqrestore(&desc->lock, flags); |
593 | } | 593 | } |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index ae1b684e048c..9aa3e7b81389 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -397,10 +397,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
397 | if (!(desc->status & IRQ_NOAUTOEN)) { | 397 | if (!(desc->status & IRQ_NOAUTOEN)) { |
398 | desc->depth = 0; | 398 | desc->depth = 0; |
399 | desc->status &= ~IRQ_DISABLED; | 399 | desc->status &= ~IRQ_DISABLED; |
400 | if (desc->chip->startup) | 400 | desc->chip->startup(irq); |
401 | desc->chip->startup(irq); | ||
402 | else | ||
403 | desc->chip->enable(irq); | ||
404 | } else | 401 | } else |
405 | /* Undo nested disables: */ | 402 | /* Undo nested disables: */ |
406 | desc->depth = 1; | 403 | desc->depth = 1; |