All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irq: generic-chip: provide irq_free_generic_chip()
@ 2017-03-08 17:00 Bartosz Golaszewski
  2017-03-08 17:03 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2017-03-08 17:00 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier; +Cc: linux-kernel, Bartosz Golaszewski

Some users of irq_alloc_generic_chip() are modules which can be
removed (e.g. gpio-ml-ioh) but have no means of freeing the allocated
generic chip. Provide a function for that.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 include/linux/irq.h       | 1 +
 kernel/irq/generic-chip.c | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index f887351..04e5120 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -950,6 +950,7 @@ void irq_setup_generic_chip(struct irq_chip_generic *gc, u32 msk,
 int irq_setup_alt_chip(struct irq_data *d, unsigned int type);
 void irq_remove_generic_chip(struct irq_chip_generic *gc, u32 msk,
 			     unsigned int clr, unsigned int set);
+void irq_free_generic_chip(struct irq_chip_generic *gc);
 
 struct irq_chip_generic *irq_get_domain_generic_chip(struct irq_domain *d, unsigned int hw_irq);
 
diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index ee32870..8122c9c 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -545,6 +545,12 @@ void irq_remove_generic_chip(struct irq_chip_generic *gc, u32 msk,
 }
 EXPORT_SYMBOL_GPL(irq_remove_generic_chip);
 
+void irq_free_generic_chip(struct irq_chip_generic *gc)
+{
+	kfree(gc);
+}
+EXPORT_SYMBOL_GPL(irq_free_generic_chip);
+
 static struct irq_data *irq_gc_get_irq_data(struct irq_chip_generic *gc)
 {
 	unsigned int virq;
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] irq: generic-chip: provide irq_free_generic_chip()
  2017-03-08 17:00 [PATCH] irq: generic-chip: provide irq_free_generic_chip() Bartosz Golaszewski
@ 2017-03-08 17:03 ` Bartosz Golaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2017-03-08 17:03 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier; +Cc: LKML, Bartosz Golaszewski

2017-03-08 18:00 GMT+01:00 Bartosz Golaszewski <bgolaszewski@baylibre.com>:
> Some users of irq_alloc_generic_chip() are modules which can be
> removed (e.g. gpio-ml-ioh) but have no means of freeing the allocated
> generic chip. Provide a function for that.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---

Eek, -ETOEARLY - forgot the kernel doc...

Disregard this patch.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-08 17:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 17:00 [PATCH] irq: generic-chip: provide irq_free_generic_chip() Bartosz Golaszewski
2017-03-08 17:03 ` Bartosz Golaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.