From: Thierry Reding <thierry.reding@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Timo Alho <talho@nvidia.com>,
linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] gpio: max77620: Do not allocate IRQs upfront
Date: Wed, 2 Oct 2019 14:28:24 +0200 [thread overview]
Message-ID: <20191002122825.3948322-2-thierry.reding@gmail.com> (raw)
In-Reply-To: <20191002122825.3948322-1-thierry.reding@gmail.com>
From: Thierry Reding <treding@nvidia.com>
regmap_add_irq_chip() will try to allocate all of the IRQ descriptors
upfront if passed a non-zero irq_base parameter. However, the intention
is to allocate IRQ descriptors on an as-needed basis if possible. Pass 0
instead of -1 to fix that use-case.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/gpio/gpio-max77620.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-max77620.c b/drivers/gpio/gpio-max77620.c
index faf86ea9c51a..c58b56e5291e 100644
--- a/drivers/gpio/gpio-max77620.c
+++ b/drivers/gpio/gpio-max77620.c
@@ -304,7 +304,7 @@ static int max77620_gpio_probe(struct platform_device *pdev)
}
ret = devm_regmap_add_irq_chip(&pdev->dev, chip->rmap, gpio_irq,
- IRQF_ONESHOT, -1,
+ IRQF_ONESHOT, 0,
&max77620_gpio_irq_chip,
&chip->gpio_irq_data);
if (ret < 0) {
--
2.23.0
next prev parent reply other threads:[~2019-10-02 12:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-02 12:28 [PATCH 1/3] gpio: max77620: Use correct unit for debounce times Thierry Reding
2019-10-02 12:28 ` Thierry Reding [this message]
2019-10-04 22:01 ` [PATCH 2/3] gpio: max77620: Do not allocate IRQs upfront Linus Walleij
2019-10-02 12:28 ` [PATCH 3/3] gpio: max77620: Fix interrupt handling Thierry Reding
2019-10-04 22:03 ` Linus Walleij
2019-10-04 21:58 ` [PATCH 1/3] gpio: max77620: Use correct unit for debounce times Linus Walleij
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=20191002122825.3948322-2-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=talho@nvidia.com \
/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
all inboxes | Powered by JetHome®