diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-02 16:41:14 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 06:58:10 -0500 |
commit | 4699923861513671d3f6ade8efb4e56a9a7ecadf (patch) | |
tree | 862cda99b9af6fe96fda955107f24a7b5cc97a18 /kernel/irq/autoprobe.c | |
parent | 3b56f0585fd4c02d047dc406668cb40159b2d340 (diff) |
genirq: Consolidate startup/shutdown of interrupts
Aside of duplicated code some of the startup/shutdown sites do not
handle the MASKED/DISABLED flags and the depth field at all. Move that
to a helper function and take care of it there.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20110202212551.787481468@linutronix.de>
Diffstat (limited to 'kernel/irq/autoprobe.c')
-rw-r--r-- | kernel/irq/autoprobe.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/irq/autoprobe.c b/kernel/irq/autoprobe.c index 505798f86c36..08947cb61725 100644 --- a/kernel/irq/autoprobe.c +++ b/kernel/irq/autoprobe.c | |||
@@ -60,7 +60,7 @@ unsigned long probe_irq_on(void) | |||
60 | if (desc->irq_data.chip->irq_set_type) | 60 | if (desc->irq_data.chip->irq_set_type) |
61 | desc->irq_data.chip->irq_set_type(&desc->irq_data, | 61 | desc->irq_data.chip->irq_set_type(&desc->irq_data, |
62 | IRQ_TYPE_PROBE); | 62 | IRQ_TYPE_PROBE); |
63 | desc->irq_data.chip->irq_startup(&desc->irq_data); | 63 | irq_startup(desc); |
64 | } | 64 | } |
65 | raw_spin_unlock_irq(&desc->lock); | 65 | raw_spin_unlock_irq(&desc->lock); |
66 | } | 66 | } |
@@ -77,7 +77,7 @@ unsigned long probe_irq_on(void) | |||
77 | raw_spin_lock_irq(&desc->lock); | 77 | raw_spin_lock_irq(&desc->lock); |
78 | if (!desc->action && !(desc->status & IRQ_NOPROBE)) { | 78 | if (!desc->action && !(desc->status & IRQ_NOPROBE)) { |
79 | desc->status |= IRQ_AUTODETECT | IRQ_WAITING; | 79 | desc->status |= IRQ_AUTODETECT | IRQ_WAITING; |
80 | if (desc->irq_data.chip->irq_startup(&desc->irq_data)) | 80 | if (irq_startup(desc)) |
81 | desc->status |= IRQ_PENDING; | 81 | desc->status |= IRQ_PENDING; |
82 | } | 82 | } |
83 | raw_spin_unlock_irq(&desc->lock); | 83 | raw_spin_unlock_irq(&desc->lock); |
@@ -99,7 +99,7 @@ unsigned long probe_irq_on(void) | |||
99 | /* It triggered already - consider it spurious. */ | 99 | /* It triggered already - consider it spurious. */ |
100 | if (!(status & IRQ_WAITING)) { | 100 | if (!(status & IRQ_WAITING)) { |
101 | desc->status = status & ~IRQ_AUTODETECT; | 101 | desc->status = status & ~IRQ_AUTODETECT; |
102 | desc->irq_data.chip->irq_shutdown(&desc->irq_data); | 102 | irq_shutdown(desc); |
103 | } else | 103 | } else |
104 | if (i < 32) | 104 | if (i < 32) |
105 | mask |= 1 << i; | 105 | mask |= 1 << i; |
@@ -138,7 +138,7 @@ unsigned int probe_irq_mask(unsigned long val) | |||
138 | mask |= 1 << i; | 138 | mask |= 1 << i; |
139 | 139 | ||
140 | desc->status = status & ~IRQ_AUTODETECT; | 140 | desc->status = status & ~IRQ_AUTODETECT; |
141 | desc->irq_data.chip->irq_shutdown(&desc->irq_data); | 141 | irq_shutdown(desc); |
142 | } | 142 | } |
143 | raw_spin_unlock_irq(&desc->lock); | 143 | raw_spin_unlock_irq(&desc->lock); |
144 | } | 144 | } |
@@ -182,7 +182,7 @@ int probe_irq_off(unsigned long val) | |||
182 | nr_of_irqs++; | 182 | nr_of_irqs++; |
183 | } | 183 | } |
184 | desc->status = status & ~IRQ_AUTODETECT; | 184 | desc->status = status & ~IRQ_AUTODETECT; |
185 | desc->irq_data.chip->irq_shutdown(&desc->irq_data); | 185 | irq_shutdown(desc); |
186 | } | 186 | } |
187 | raw_spin_unlock_irq(&desc->lock); | 187 | raw_spin_unlock_irq(&desc->lock); |
188 | } | 188 | } |