diff options
Diffstat (limited to 'kernel/irq/irqdesc.c')
-rw-r--r-- | kernel/irq/irqdesc.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 3387fbd7f2f4..394ab6a6c62c 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c | |||
@@ -402,6 +402,26 @@ unsigned int irq_get_next_irq(unsigned int offset) | |||
402 | return find_next_bit(allocated_irqs, nr_irqs, offset); | 402 | return find_next_bit(allocated_irqs, nr_irqs, offset); |
403 | } | 403 | } |
404 | 404 | ||
405 | struct irq_desc * | ||
406 | __irq_get_desc_lock(unsigned int irq, unsigned long *flags, bool bus) | ||
407 | { | ||
408 | struct irq_desc *desc = irq_to_desc(irq); | ||
409 | |||
410 | if (desc) { | ||
411 | if (bus) | ||
412 | chip_bus_lock(desc); | ||
413 | raw_spin_lock_irqsave(&desc->lock, *flags); | ||
414 | } | ||
415 | return desc; | ||
416 | } | ||
417 | |||
418 | void __irq_put_desc_unlock(struct irq_desc *desc, unsigned long flags, bool bus) | ||
419 | { | ||
420 | raw_spin_unlock_irqrestore(&desc->lock, flags); | ||
421 | if (bus) | ||
422 | chip_bus_sync_unlock(desc); | ||
423 | } | ||
424 | |||
405 | /** | 425 | /** |
406 | * dynamic_irq_cleanup - cleanup a dynamically allocated irq | 426 | * dynamic_irq_cleanup - cleanup a dynamically allocated irq |
407 | * @irq: irq number to initialize | 427 | * @irq: irq number to initialize |