aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2006-07-01 22:29:31 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-02 16:58:49 -0400
commit3cca53b02a5bab0f407b1add2f84c22c20243a79 (patch)
tree06d375432c8c5c8895378e0b5049920e73211b2d /kernel
parent85ac3ab254405edcc7bef7d61b03930247882efc (diff)
[PATCH] irq-flags: generic irq: Use the new IRQF_ constants
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/handle.c4
-rw-r--r--kernel/irq/manage.c38
-rw-r--r--kernel/irq/spurious.c4
3 files changed, 23 insertions, 23 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 5a360dd4331b..6070e0464690 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -113,7 +113,7 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
113 irqreturn_t ret, retval = IRQ_NONE; 113 irqreturn_t ret, retval = IRQ_NONE;
114 unsigned int status = 0; 114 unsigned int status = 0;
115 115
116 if (!(action->flags & SA_INTERRUPT)) 116 if (!(action->flags & IRQF_DISABLED))
117 local_irq_enable(); 117 local_irq_enable();
118 118
119 do { 119 do {
@@ -124,7 +124,7 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
124 action = action->next; 124 action = action->next;
125 } while (action); 125 } while (action);
126 126
127 if (status & SA_SAMPLE_RANDOM) 127 if (status & IRQF_SAMPLE_RANDOM)
128 add_interrupt_randomness(irq); 128 add_interrupt_randomness(irq);
129 local_irq_disable(); 129 local_irq_disable();
130 130
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index fcce5181e453..fede5fa351df 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -167,7 +167,7 @@ int can_request_irq(unsigned int irq, unsigned long irqflags)
167 167
168 action = irq_desc[irq].action; 168 action = irq_desc[irq].action;
169 if (action) 169 if (action)
170 if (irqflags & action->flags & SA_SHIRQ) 170 if (irqflags & action->flags & IRQF_SHARED)
171 action = NULL; 171 action = NULL;
172 172
173 return !action; 173 return !action;
@@ -205,7 +205,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
205 * so we have to be careful not to interfere with a 205 * so we have to be careful not to interfere with a
206 * running system. 206 * running system.
207 */ 207 */
208 if (new->flags & SA_SAMPLE_RANDOM) { 208 if (new->flags & IRQF_SAMPLE_RANDOM) {
209 /* 209 /*
210 * This function might sleep, we want to call it first, 210 * This function might sleep, we want to call it first,
211 * outside of the atomic block. 211 * outside of the atomic block.
@@ -227,17 +227,17 @@ int setup_irq(unsigned int irq, struct irqaction *new)
227 /* 227 /*
228 * Can't share interrupts unless both agree to and are 228 * Can't share interrupts unless both agree to and are
229 * the same type (level, edge, polarity). So both flag 229 * the same type (level, edge, polarity). So both flag
230 * fields must have SA_SHIRQ set and the bits which 230 * fields must have IRQF_SHARED set and the bits which
231 * set the trigger type must match. 231 * set the trigger type must match.
232 */ 232 */
233 if (!((old->flags & new->flags) & SA_SHIRQ) || 233 if (!((old->flags & new->flags) & IRQF_SHARED) ||
234 ((old->flags ^ new->flags) & SA_TRIGGER_MASK)) 234 ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK))
235 goto mismatch; 235 goto mismatch;
236 236
237#if defined(CONFIG_IRQ_PER_CPU) && defined(SA_PERCPU_IRQ) 237#if defined(CONFIG_IRQ_PER_CPU) && defined(IRQF_PERCPU)
238 /* All handlers must agree on per-cpuness */ 238 /* All handlers must agree on per-cpuness */
239 if ((old->flags & SA_PERCPU_IRQ) != 239 if ((old->flags & IRQF_PERCPU) !=
240 (new->flags & SA_PERCPU_IRQ)) 240 (new->flags & IRQF_PERCPU))
241 goto mismatch; 241 goto mismatch;
242#endif 242#endif
243 243
@@ -250,24 +250,24 @@ int setup_irq(unsigned int irq, struct irqaction *new)
250 } 250 }
251 251
252 *p = new; 252 *p = new;
253#if defined(CONFIG_IRQ_PER_CPU) && defined(SA_PERCPU_IRQ) 253#if defined(CONFIG_IRQ_PER_CPU) && defined(IRQF_PERCPU)
254 if (new->flags & SA_PERCPU_IRQ) 254 if (new->flags & IRQF_PERCPU)
255 desc->status |= IRQ_PER_CPU; 255 desc->status |= IRQ_PER_CPU;
256#endif 256#endif
257 if (!shared) { 257 if (!shared) {
258 irq_chip_set_defaults(desc->chip); 258 irq_chip_set_defaults(desc->chip);
259 259
260 /* Setup the type (level, edge polarity) if configured: */ 260 /* Setup the type (level, edge polarity) if configured: */
261 if (new->flags & SA_TRIGGER_MASK) { 261 if (new->flags & IRQF_TRIGGER_MASK) {
262 if (desc->chip && desc->chip->set_type) 262 if (desc->chip && desc->chip->set_type)
263 desc->chip->set_type(irq, 263 desc->chip->set_type(irq,
264 new->flags & SA_TRIGGER_MASK); 264 new->flags & IRQF_TRIGGER_MASK);
265 else 265 else
266 /* 266 /*
267 * SA_TRIGGER_* but the PIC does not support 267 * IRQF_TRIGGER_* but the PIC does not support
268 * multiple flow-types? 268 * multiple flow-types?
269 */ 269 */
270 printk(KERN_WARNING "No SA_TRIGGER set_type " 270 printk(KERN_WARNING "No IRQF_TRIGGER set_type "
271 "function for IRQ %d (%s)\n", irq, 271 "function for IRQ %d (%s)\n", irq,
272 desc->chip ? desc->chip->name : 272 desc->chip ? desc->chip->name :
273 "unknown"); 273 "unknown");
@@ -299,7 +299,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
299 299
300mismatch: 300mismatch:
301 spin_unlock_irqrestore(&desc->lock, flags); 301 spin_unlock_irqrestore(&desc->lock, flags);
302 if (!(new->flags & SA_PROBEIRQ)) { 302 if (!(new->flags & IRQF_PROBE_SHARED)) {
303 printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq); 303 printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq);
304 dump_stack(); 304 dump_stack();
305 } 305 }
@@ -398,9 +398,9 @@ EXPORT_SYMBOL(free_irq);
398 * 398 *
399 * Flags: 399 * Flags:
400 * 400 *
401 * SA_SHIRQ Interrupt is shared 401 * IRQF_SHARED Interrupt is shared
402 * SA_INTERRUPT Disable local interrupts while processing 402 * IRQF_DISABLED Disable local interrupts while processing
403 * SA_SAMPLE_RANDOM The interrupt can be used for entropy 403 * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy
404 * 404 *
405 */ 405 */
406int request_irq(unsigned int irq, 406int request_irq(unsigned int irq,
@@ -416,7 +416,7 @@ int request_irq(unsigned int irq,
416 * which interrupt is which (messes up the interrupt freeing 416 * which interrupt is which (messes up the interrupt freeing
417 * logic etc). 417 * logic etc).
418 */ 418 */
419 if ((irqflags & SA_SHIRQ) && !dev_id) 419 if ((irqflags & IRQF_SHARED) && !dev_id)
420 return -EINVAL; 420 return -EINVAL;
421 if (irq >= NR_IRQS) 421 if (irq >= NR_IRQS)
422 return -EINVAL; 422 return -EINVAL;
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index b483deed311c..417e98092cf2 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -36,7 +36,7 @@ static int misrouted_irq(int irq, struct pt_regs *regs)
36 * Already running: If it is shared get the other 36 * Already running: If it is shared get the other
37 * CPU to go looking for our mystery interrupt too 37 * CPU to go looking for our mystery interrupt too
38 */ 38 */
39 if (desc->action && (desc->action->flags & SA_SHIRQ)) 39 if (desc->action && (desc->action->flags & IRQF_SHARED))
40 desc->status |= IRQ_PENDING; 40 desc->status |= IRQ_PENDING;
41 spin_unlock(&desc->lock); 41 spin_unlock(&desc->lock);
42 continue; 42 continue;
@@ -48,7 +48,7 @@ static int misrouted_irq(int irq, struct pt_regs *regs)
48 48
49 while (action) { 49 while (action) {
50 /* Only shared IRQ handlers are safe to call */ 50 /* Only shared IRQ handlers are safe to call */
51 if (action->flags & SA_SHIRQ) { 51 if (action->flags & IRQF_SHARED) {
52 if (action->handler(i, action->dev_id, regs) == 52 if (action->handler(i, action->dev_id, regs) ==
53 IRQ_HANDLED) 53 IRQ_HANDLED)
54 ok = 1; 54 ok = 1;