[PATCH 5/8] irq: Kill irq_reserve_irq/irq_reserve_irqs
No user any more. Signed-off-by: Yinghai Lu --- include/linux/irq.h | 6 -- kernel/irq/irqdesc.c | 25 - 2 files changed, 31 deletions(-) diff --git a/include/linux/irq.h b/include/linux/irq.h index 28cbd3e..02dc0e4 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -623,7 +623,6 @@ int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, irq_alloc_descs(-1, from, cnt, node) void irq_free_descs(unsigned int irq, unsigned int cnt); -int irq_reserve_irqs(unsigned int from, unsigned int cnt); int arch_probe_early_allocate_nr_irqs(void); static inline void irq_free_desc(unsigned int irq) @@ -631,11 +630,6 @@ static inline void irq_free_desc(unsigned int irq) irq_free_descs(irq, 1); } -static inline int irq_reserve_irq(unsigned int irq) -{ - return irq_reserve_irqs(irq, 1); -} - #ifndef irq_reg_writel # define irq_reg_writel(val, addr) writel(val, addr) #endif diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index dfb971c..49bf891 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -400,31 +400,6 @@ err: EXPORT_SYMBOL_GPL(__irq_alloc_descs); /** - * irq_reserve_irqs - mark irqs allocated - * @from: mark from irq number - * @cnt: number of irqs to mark - * - * Returns 0 on success or an appropriate error code - */ -int irq_reserve_irqs(unsigned int from, unsigned int cnt) -{ - unsigned int start; - int ret = 0; - - if (!cnt || (from + cnt) > nr_irqs) - return -EINVAL; - - mutex_lock(_irq_lock); - start = bitmap_find_next_zero_area(allocated_irqs, nr_irqs, from, cnt, 0); - if (start == from) - bitmap_set(allocated_irqs, start, cnt); - else - ret = -EEXIST; - mutex_unlock(_irq_lock); - return ret; -} - -/** * irq_get_next_irq - get next allocated irq number * @offset:where to start the search * -- 1.8.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 5/8] irq: Kill irq_reserve_irq/irq_reserve_irqs
No user any more. Signed-off-by: Yinghai Lu ying...@kernel.org --- include/linux/irq.h | 6 -- kernel/irq/irqdesc.c | 25 - 2 files changed, 31 deletions(-) diff --git a/include/linux/irq.h b/include/linux/irq.h index 28cbd3e..02dc0e4 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -623,7 +623,6 @@ int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, irq_alloc_descs(-1, from, cnt, node) void irq_free_descs(unsigned int irq, unsigned int cnt); -int irq_reserve_irqs(unsigned int from, unsigned int cnt); int arch_probe_early_allocate_nr_irqs(void); static inline void irq_free_desc(unsigned int irq) @@ -631,11 +630,6 @@ static inline void irq_free_desc(unsigned int irq) irq_free_descs(irq, 1); } -static inline int irq_reserve_irq(unsigned int irq) -{ - return irq_reserve_irqs(irq, 1); -} - #ifndef irq_reg_writel # define irq_reg_writel(val, addr) writel(val, addr) #endif diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index dfb971c..49bf891 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -400,31 +400,6 @@ err: EXPORT_SYMBOL_GPL(__irq_alloc_descs); /** - * irq_reserve_irqs - mark irqs allocated - * @from: mark from irq number - * @cnt: number of irqs to mark - * - * Returns 0 on success or an appropriate error code - */ -int irq_reserve_irqs(unsigned int from, unsigned int cnt) -{ - unsigned int start; - int ret = 0; - - if (!cnt || (from + cnt) nr_irqs) - return -EINVAL; - - mutex_lock(sparse_irq_lock); - start = bitmap_find_next_zero_area(allocated_irqs, nr_irqs, from, cnt, 0); - if (start == from) - bitmap_set(allocated_irqs, start, cnt); - else - ret = -EEXIST; - mutex_unlock(sparse_irq_lock); - return ret; -} - -/** * irq_get_next_irq - get next allocated irq number * @offset:where to start the search * -- 1.8.4.5 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/