aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/manage.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r--kernel/irq/manage.c38
1 files changed, 19 insertions, 19 deletions
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;