From: tip-bot for Bartosz Golaszewski <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: brgl@bgdev.pl, hpa@zytor.com, linux-kernel@vger.kernel.org,
marc.zyngier@arm.com, corbet@lwn.net, tglx@linutronix.de,
mingo@kernel.org
Subject: [tip:irq/core] irq/generic-chip: Provide irq_destroy_generic_chip()
Date: Wed, 21 Jun 2017 06:59:20 -0700 [thread overview]
Message-ID: <tip-32bb6cbb3b4ea5ca24e3fa13e11772c192616e04@git.kernel.org> (raw)
In-Reply-To: <1496246820-13250-3-git-send-email-brgl@bgdev.pl>
Commit-ID: 32bb6cbb3b4ea5ca24e3fa13e11772c192616e04
Gitweb: http://git.kernel.org/tip/32bb6cbb3b4ea5ca24e3fa13e11772c192616e04
Author: Bartosz Golaszewski <brgl@bgdev.pl>
AuthorDate: Wed, 31 May 2017 18:06:57 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 21 Jun 2017 15:53:10 +0200
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: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Marc 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
---
include/linux/irq.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 2c957fe..dc63aa1 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -979,6 +979,14 @@ static inline void irq_free_generic_chip(struct irq_chip_generic *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)
{
return container_of(d->chip, struct irq_chip_type, chip);
next prev parent reply other threads:[~2017-06-21 14:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-31 16:06 [PATCH 0/5] irq: generic-chip: resource management improvements Bartosz Golaszewski
2017-05-31 16:06 ` [PATCH 1/5] irq: generic-chip: provide irq_free_generic_chip() Bartosz Golaszewski
2017-06-01 18:59 ` kbuild test robot
2017-06-21 13:58 ` [tip:irq/core] irq/generic-chip: Provide irq_free_generic_chip() tip-bot for Bartosz Golaszewski
2017-05-31 16:06 ` [PATCH 2/5] irq: generic-chip: provide irq_destroy_generic_chip() Bartosz Golaszewski
2017-06-21 13:59 ` tip-bot for Bartosz Golaszewski [this message]
2017-05-31 16:06 ` [PATCH 3/5] irq: generic-chip: export irq_init_generic_chip() locally Bartosz Golaszewski
2017-06-21 13:59 ` [tip:irq/core] irq/generic-chip: Export " tip-bot for Bartosz Golaszewski
2017-05-31 16:06 ` [PATCH 4/5] irq: generic-chip: provide devm_irq_alloc_generic_chip() Bartosz Golaszewski
2017-06-21 14:00 ` [tip:irq/core] irq/generic-chip: Provide devm_irq_alloc_generic_chip() tip-bot for Bartosz Golaszewski
2017-05-31 16:07 ` [PATCH 5/5] irq: generic-chip: provide devm_irq_setup_generic_chip() Bartosz Golaszewski
2017-06-21 14:01 ` [tip:irq/core] irq/generic-chip: Provide devm_irq_setup_generic_chip() tip-bot for Bartosz Golaszewski
2017-06-20 10:31 ` [PATCH 0/5] irq: generic-chip: resource management improvements Bartosz Golaszewski
2017-06-20 10:41 ` Marc Zyngier
2017-06-20 10:47 ` Bartosz Golaszewski
2017-06-20 14:14 ` Thomas Gleixner
2017-06-21 10:35 ` Bartosz Golaszewski
2017-06-21 10:42 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-32bb6cbb3b4ea5ca24e3fa13e11772c192616e04@git.kernel.org \
--to=tipbot@zytor.com \
--cc=brgl@bgdev.pl \
--cc=corbet@lwn.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.