mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ooi, Joyce" <joyce.ooi@intel.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Joyce Ooi <joyce.ooi@intel.com>,
	See Chin Liang <chin.liang.see@intel.com>,
	Tan Ley Foon <ley.foon.tan@intel.com>,
	Ooi@vger.kernel.org
Subject: [PATCH] gpio: altera: change to platform_get_irq_optional to avoid false-positive error
Date: Thu,  9 Jan 2020 00:16:20 +0800	[thread overview]
Message-ID: <20200108161620.80105-1-joyce.ooi@intel.com> (raw)

This patch switches to platform_get_irq_optional() from
platform_get_irq() as it causes a false-positive error such as 'IRQ
index 0 not found' when IRQ is not used. The IRQ usage is optional in
this gpio-altera driver, so the error log is undesirable.

Signed-off-by: Ooi, Joyce <joyce.ooi@intel.com>
---
 drivers/gpio/gpio-altera.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c
index 9f2e6b04c361..cc4ba71e4fe3 100644
--- a/drivers/gpio/gpio-altera.c
+++ b/drivers/gpio/gpio-altera.c
@@ -266,7 +266,7 @@ static int altera_gpio_probe(struct platform_device *pdev)
 	altera_gc->mmchip.gc.owner		= THIS_MODULE;
 	altera_gc->mmchip.gc.parent		= &pdev->dev;
 
-	altera_gc->mapped_irq = platform_get_irq(pdev, 0);
+	altera_gc->mapped_irq = platform_get_irq_optional(pdev, 0);
 
 	if (altera_gc->mapped_irq < 0)
 		goto skip_irq;
-- 
2.13.0


             reply	other threads:[~2020-01-08 16:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 16:16 Ooi, Joyce [this message]
2020-01-09  9:38 ` 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=20200108161620.80105-1-joyce.ooi@intel.com \
    --to=joyce.ooi@intel.com \
    --cc=Ooi@vger.kernel.org \
    --cc=bgolaszewski@baylibre.com \
    --cc=chin.liang.see@intel.com \
    --cc=ley.foon.tan@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®