提交 32bb6cbb 编写于 作者: B Bartosz Golaszewski 提交者: Thomas Gleixner

irq/generic-chip: Provide irq_destroy_generic_chip()

Most users of irq_alloc_generic_chip() call irq_setup_generic_chip()
too. To simplify the cleanup provide a function that both removes a
generic chip and frees its memory.
Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
Cc: linux-doc@vger.kernel.org
Cc: Jonathan Corbet <corbet@lwn.net>
Link: http://lkml.kernel.org/r/1496246820-13250-3-git-send-email-brgl@bgdev.pl
上级 707188f5
...@@ -979,6 +979,14 @@ static inline void irq_free_generic_chip(struct irq_chip_generic *gc) ...@@ -979,6 +979,14 @@ static inline void irq_free_generic_chip(struct irq_chip_generic *gc)
kfree(gc); kfree(gc);
} }
static inline void irq_destroy_generic_chip(struct irq_chip_generic *gc,
u32 msk, unsigned int clr,
unsigned int set)
{
irq_remove_generic_chip(gc, msk, clr, set);
irq_free_generic_chip(gc);
}
static inline struct irq_chip_type *irq_data_get_chip_type(struct irq_data *d) static inline struct irq_chip_type *irq_data_get_chip_type(struct irq_data *d)
{ {
return container_of(d->chip, struct irq_chip_type, chip); return container_of(d->chip, struct irq_chip_type, chip);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册