diff options
-rw-r--r-- | include/linux/irq.h | 7 | ||||
-rw-r--r-- | kernel/irq/irqdesc.c | 25 |
2 files changed, 0 insertions, 32 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index ac9634286f42..2110f46fcafa 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -617,18 +617,11 @@ int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, | |||
617 | irq_alloc_descs(-1, from, cnt, node) | 617 | irq_alloc_descs(-1, from, cnt, node) |
618 | 618 | ||
619 | void irq_free_descs(unsigned int irq, unsigned int cnt); | 619 | void irq_free_descs(unsigned int irq, unsigned int cnt); |
620 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); | ||
621 | |||
622 | static inline void irq_free_desc(unsigned int irq) | 620 | static inline void irq_free_desc(unsigned int irq) |
623 | { | 621 | { |
624 | irq_free_descs(irq, 1); | 622 | irq_free_descs(irq, 1); |
625 | } | 623 | } |
626 | 624 | ||
627 | static inline int irq_reserve_irq(unsigned int irq) | ||
628 | { | ||
629 | return irq_reserve_irqs(irq, 1); | ||
630 | } | ||
631 | |||
632 | #ifdef CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ | 625 | #ifdef CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ |
633 | unsigned int irq_alloc_hwirqs(int cnt, int node); | 626 | unsigned int irq_alloc_hwirqs(int cnt, int node); |
634 | static inline unsigned int irq_alloc_hwirq(int node) | 627 | static inline unsigned int irq_alloc_hwirq(int node) |
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 24029348729b..d514ed6080e1 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c | |||
@@ -455,31 +455,6 @@ EXPORT_SYMBOL_GPL(irq_free_hwirqs); | |||
455 | #endif | 455 | #endif |
456 | 456 | ||
457 | /** | 457 | /** |
458 | * irq_reserve_irqs - mark irqs allocated | ||
459 | * @from: mark from irq number | ||
460 | * @cnt: number of irqs to mark | ||
461 | * | ||
462 | * Returns 0 on success or an appropriate error code | ||
463 | */ | ||
464 | int irq_reserve_irqs(unsigned int from, unsigned int cnt) | ||
465 | { | ||
466 | unsigned int start; | ||
467 | int ret = 0; | ||
468 | |||
469 | if (!cnt || (from + cnt) > nr_irqs) | ||
470 | return -EINVAL; | ||
471 | |||
472 | mutex_lock(&sparse_irq_lock); | ||
473 | start = bitmap_find_next_zero_area(allocated_irqs, nr_irqs, from, cnt, 0); | ||
474 | if (start == from) | ||
475 | bitmap_set(allocated_irqs, start, cnt); | ||
476 | else | ||
477 | ret = -EEXIST; | ||
478 | mutex_unlock(&sparse_irq_lock); | ||
479 | return ret; | ||
480 | } | ||
481 | |||
482 | /** | ||
483 | * irq_get_next_irq - get next allocated irq number | 458 | * irq_get_next_irq - get next allocated irq number |
484 | * @offset: where to start the search | 459 | * @offset: where to start the search |
485 | * | 460 | * |