linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Kevin Hilman <khilman@kernel.org>,
	Robert Jarzmik <robert.jarzmik@free.fr>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: [PATCH 03/12] gpio: omap: use devm_irq_alloc_descs()
Date: Sat,  4 Mar 2017 17:23:31 +0100	[thread overview]
Message-ID: <1488644620-11488-4-git-send-email-bgolaszewski@baylibre.com> (raw)
In-Reply-To: <1488644620-11488-1-git-send-email-bgolaszewski@baylibre.com>

This driver never frees the allocated interrupt descriptors. Fix it by
using a resource managed variant of irq_alloc_descs().

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 drivers/gpio/gpio-omap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index efc85a2..5d6a574 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1085,7 +1085,8 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
 	 * REVISIT: Once we have OMAP1 supporting SPARSE_IRQ, we can drop
 	 * irq_alloc_descs() since a base IRQ offset will no longer be needed.
 	 */
-	irq_base = irq_alloc_descs(-1, 0, bank->width, 0);
+	irq_base = devm_irq_alloc_descs(bank->chip.parent,
+					-1, 0, bank->width, 0);
 	if (irq_base < 0) {
 		dev_err(bank->chip.parent, "Couldn't allocate IRQ numbers\n");
 		return -ENODEV;
-- 
2.9.3

  parent reply	other threads:[~2017-03-04 16:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-04 16:23 [PATCH 00/12] gpio: use resource management for irq descriptors Bartosz Golaszewski
2017-03-04 16:23 ` [PATCH 01/12] gpio: mockup: use devm_irq_alloc_descs() Bartosz Golaszewski
2017-03-08  8:21   ` Bamvor Zhang Jian
2017-03-14 15:08   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 02/12] gpio: twl4030: " Bartosz Golaszewski
2017-03-14 15:08   ` Linus Walleij
2017-03-04 16:23 ` Bartosz Golaszewski [this message]
2017-03-06 16:50   ` [PATCH 03/12] gpio: omap: " Tony Lindgren
2017-03-14 15:09   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 04/12] gpio: pch: use resource management for irqs Bartosz Golaszewski
2017-03-14 15:10   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 05/12] gpio: ml-ioh: " Bartosz Golaszewski
2017-03-14 15:11   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 06/12] gpio: xlp: " Bartosz Golaszewski
2017-03-14 15:11   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 07/12] gpio: pxa: use devm_irq_alloc_descs() Bartosz Golaszewski
2017-03-04 20:31   ` Robert Jarzmik
2017-03-14 15:12   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 08/12] gpio: davinci: " Bartosz Golaszewski
2017-03-06  4:59   ` Keerthy
2017-03-14 15:13   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 09/12] gpio: sodaville: use resource management for irqs Bartosz Golaszewski
2017-03-14 15:14   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 10/12] gpio: mxc: use devm_irq_alloc_descs() Bartosz Golaszewski
2017-03-14 15:15   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 11/12] gpio: mxs: " Bartosz Golaszewski
2017-03-14 15:16   ` Linus Walleij
2017-03-04 16:23 ` [PATCH 12/12] gpio: sta2x11: use resource management for irqs Bartosz Golaszewski
2017-03-14 15:16   ` Linus Walleij
2017-03-14 15:18 ` [PATCH 00/12] gpio: use resource management for irq descriptors Linus Walleij
2017-03-14 15:45   ` Bartosz Golaszewski

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=1488644620-11488-4-git-send-email-bgolaszewski@baylibre.com \
    --to=bgolaszewski@baylibre.com \
    --cc=bamvor.zhangjian@linaro.org \
    --cc=gnurou@gmail.com \
    --cc=grygorii.strashko@ti.com \
    --cc=khilman@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=robert.jarzmik@free.fr \
    --cc=ssantosh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).