From: Lubomir Rintel <lkundrak@v3.sk>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Lubomir Rintel <lkundrak@v3.sk>
Subject: [PATCH] gpio: pxa: Avoid a warning when gpio0 and gpio1 IRQS are not there
Date: Tue, 28 Jan 2020 22:08:45 +0100 [thread overview]
Message-ID: <20200128210845.332679-1-lkundrak@v3.sk> (raw)
Not all platforms use those. Let's use
platform_get_irq_byname_optional() instead platform_get_irq_byname() so
that we avoid a useless warning:
[ 1.359455] pxa-gpio d4019000.gpio: IRQ gpio0 not found
[ 1.359583] pxa-gpio d4019000.gpio: IRQ gpio1 not found
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
drivers/gpio/gpio-pxa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index 9888b62f37afb..567742d962aef 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -652,8 +652,8 @@ static int pxa_gpio_probe(struct platform_device *pdev)
if (!pchip->irqdomain)
return -ENOMEM;
- irq0 = platform_get_irq_byname(pdev, "gpio0");
- irq1 = platform_get_irq_byname(pdev, "gpio1");
+ irq0 = platform_get_irq_byname_optional(pdev, "gpio0");
+ irq1 = platform_get_irq_byname_optional(pdev, "gpio1");
irq_mux = platform_get_irq_byname(pdev, "gpio_mux");
if ((irq0 > 0 && irq1 <= 0) || (irq0 <= 0 && irq1 > 0)
|| (irq_mux <= 0))
--
2.24.1
next reply other threads:[~2020-01-28 21:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 21:08 Lubomir Rintel [this message]
2020-02-04 10:13 ` [PATCH] gpio: pxa: Avoid a warning when gpio0 and gpio1 IRQS are not there Bartosz Golaszewski
2020-02-05 17:57 ` Robert Jarzmik
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=20200128210845.332679-1-lkundrak@v3.sk \
--to=lkundrak@v3.sk \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robert.jarzmik@free.fr \
/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).