Commit 3cca53b02a5bab0f407b1add2f84c22c20243a79
Committed by
Linus Torvalds
1 parent
85ac3ab254
Exists in
master
and in
4 other branches
[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>
Showing 3 changed files with 23 additions and 23 deletions Side-by-side Diff
kernel/irq/handle.c
| ... | ... | @@ -113,7 +113,7 @@ |
| 113 | 113 | irqreturn_t ret, retval = IRQ_NONE; |
| 114 | 114 | unsigned int status = 0; |
| 115 | 115 | |
| 116 | - if (!(action->flags & SA_INTERRUPT)) | |
| 116 | + if (!(action->flags & IRQF_DISABLED)) | |
| 117 | 117 | local_irq_enable(); |
| 118 | 118 | |
| 119 | 119 | do { |
| ... | ... | @@ -124,7 +124,7 @@ |
| 124 | 124 | action = action->next; |
| 125 | 125 | } while (action); |
| 126 | 126 | |
| 127 | - if (status & SA_SAMPLE_RANDOM) | |
| 127 | + if (status & IRQF_SAMPLE_RANDOM) | |
| 128 | 128 | add_interrupt_randomness(irq); |
| 129 | 129 | local_irq_disable(); |
| 130 | 130 |
kernel/irq/manage.c
| ... | ... | @@ -167,7 +167,7 @@ |
| 167 | 167 | |
| 168 | 168 | action = irq_desc[irq].action; |
| 169 | 169 | if (action) |
| 170 | - if (irqflags & action->flags & SA_SHIRQ) | |
| 170 | + if (irqflags & action->flags & IRQF_SHARED) | |
| 171 | 171 | action = NULL; |
| 172 | 172 | |
| 173 | 173 | return !action; |
| ... | ... | @@ -205,7 +205,7 @@ |
| 205 | 205 | * so we have to be careful not to interfere with a |
| 206 | 206 | * running system. |
| 207 | 207 | */ |
| 208 | - if (new->flags & SA_SAMPLE_RANDOM) { | |
| 208 | + if (new->flags & IRQF_SAMPLE_RANDOM) { | |
| 209 | 209 | /* |
| 210 | 210 | * This function might sleep, we want to call it first, |
| 211 | 211 | * outside of the atomic block. |
| 212 | 212 | |
| 213 | 213 | |
| 214 | 214 | |
| ... | ... | @@ -227,17 +227,17 @@ |
| 227 | 227 | /* |
| 228 | 228 | * Can't share interrupts unless both agree to and are |
| 229 | 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 | 231 | * set the trigger type must match. |
| 232 | 232 | */ |
| 233 | - if (!((old->flags & new->flags) & SA_SHIRQ) || | |
| 234 | - ((old->flags ^ new->flags) & SA_TRIGGER_MASK)) | |
| 233 | + if (!((old->flags & new->flags) & IRQF_SHARED) || | |
| 234 | + ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) | |
| 235 | 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 | 238 | /* All handlers must agree on per-cpuness */ |
| 239 | - if ((old->flags & SA_PERCPU_IRQ) != | |
| 240 | - (new->flags & SA_PERCPU_IRQ)) | |
| 239 | + if ((old->flags & IRQF_PERCPU) != | |
| 240 | + (new->flags & IRQF_PERCPU)) | |
| 241 | 241 | goto mismatch; |
| 242 | 242 | #endif |
| 243 | 243 | |
| 244 | 244 | |
| 245 | 245 | |
| 246 | 246 | |
| 247 | 247 | |
| ... | ... | @@ -250,24 +250,24 @@ |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | *p = new; |
| 253 | -#if defined(CONFIG_IRQ_PER_CPU) && defined(SA_PERCPU_IRQ) | |
| 254 | - if (new->flags & SA_PERCPU_IRQ) | |
| 253 | +#if defined(CONFIG_IRQ_PER_CPU) && defined(IRQF_PERCPU) | |
| 254 | + if (new->flags & IRQF_PERCPU) | |
| 255 | 255 | desc->status |= IRQ_PER_CPU; |
| 256 | 256 | #endif |
| 257 | 257 | if (!shared) { |
| 258 | 258 | irq_chip_set_defaults(desc->chip); |
| 259 | 259 | |
| 260 | 260 | /* Setup the type (level, edge polarity) if configured: */ |
| 261 | - if (new->flags & SA_TRIGGER_MASK) { | |
| 261 | + if (new->flags & IRQF_TRIGGER_MASK) { | |
| 262 | 262 | if (desc->chip && desc->chip->set_type) |
| 263 | 263 | desc->chip->set_type(irq, |
| 264 | - new->flags & SA_TRIGGER_MASK); | |
| 264 | + new->flags & IRQF_TRIGGER_MASK); | |
| 265 | 265 | else |
| 266 | 266 | /* |
| 267 | - * SA_TRIGGER_* but the PIC does not support | |
| 267 | + * IRQF_TRIGGER_* but the PIC does not support | |
| 268 | 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 | 271 | "function for IRQ %d (%s)\n", irq, |
| 272 | 272 | desc->chip ? desc->chip->name : |
| 273 | 273 | "unknown"); |
| ... | ... | @@ -299,7 +299,7 @@ |
| 299 | 299 | |
| 300 | 300 | mismatch: |
| 301 | 301 | spin_unlock_irqrestore(&desc->lock, flags); |
| 302 | - if (!(new->flags & SA_PROBEIRQ)) { | |
| 302 | + if (!(new->flags & IRQF_PROBE_SHARED)) { | |
| 303 | 303 | printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq); |
| 304 | 304 | dump_stack(); |
| 305 | 305 | } |
| ... | ... | @@ -398,9 +398,9 @@ |
| 398 | 398 | * |
| 399 | 399 | * Flags: |
| 400 | 400 | * |
| 401 | - * SA_SHIRQ Interrupt is shared | |
| 402 | - * SA_INTERRUPT Disable local interrupts while processing | |
| 403 | - * SA_SAMPLE_RANDOM The interrupt can be used for entropy | |
| 401 | + * IRQF_SHARED Interrupt is shared | |
| 402 | + * IRQF_DISABLED Disable local interrupts while processing | |
| 403 | + * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy | |
| 404 | 404 | * |
| 405 | 405 | */ |
| 406 | 406 | int request_irq(unsigned int irq, |
| ... | ... | @@ -416,7 +416,7 @@ |
| 416 | 416 | * which interrupt is which (messes up the interrupt freeing |
| 417 | 417 | * logic etc). |
| 418 | 418 | */ |
| 419 | - if ((irqflags & SA_SHIRQ) && !dev_id) | |
| 419 | + if ((irqflags & IRQF_SHARED) && !dev_id) | |
| 420 | 420 | return -EINVAL; |
| 421 | 421 | if (irq >= NR_IRQS) |
| 422 | 422 | return -EINVAL; |
kernel/irq/spurious.c
| ... | ... | @@ -36,7 +36,7 @@ |
| 36 | 36 | * Already running: If it is shared get the other |
| 37 | 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 | 40 | desc->status |= IRQ_PENDING; |
| 41 | 41 | spin_unlock(&desc->lock); |
| 42 | 42 | continue; |
| ... | ... | @@ -48,7 +48,7 @@ |
| 48 | 48 | |
| 49 | 49 | while (action) { |
| 50 | 50 | /* Only shared IRQ handlers are safe to call */ |
| 51 | - if (action->flags & SA_SHIRQ) { | |
| 51 | + if (action->flags & IRQF_SHARED) { | |
| 52 | 52 | if (action->handler(i, action->dev_id, regs) == |
| 53 | 53 | IRQ_HANDLED) |
| 54 | 54 | ok = 1; |