From: Horatiu Vultur <horatiu.vultur@microchip.com>
To: <linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <linus.walleij@linaro.org>, <colin.foster@in-advantage.com>,
<andriy.shevchenko@linux.intel.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>
Subject: [PATCH v2 2/2] pinctrl: ocelot: Fix interrupt parsing
Date: Fri, 4 Mar 2022 15:44:32 +0100 [thread overview]
Message-ID: <20220304144432.3397621-3-horatiu.vultur@microchip.com> (raw)
In-Reply-To: <20220304144432.3397621-1-horatiu.vultur@microchip.com>
In the blamed commit, it removes the duplicate of_node assignment in the
driver. But the driver uses this before calling into of_gpio_dev_init to
determine if it needs to assign an IRQ chip to the GPIO. The fixes
consists in using the platform_get_irq_optional
Fixes: 8a8d6bbe1d3bc7 ("pinctrl: Get rid of duplicate of_node assignment in the drivers")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
drivers/pinctrl/pinctrl-ocelot.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
index a859fbcb09af..e8501dac2f04 100644
--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -1851,8 +1851,8 @@ static int ocelot_gpiochip_register(struct platform_device *pdev,
gc->base = -1;
gc->label = "ocelot-gpio";
- irq = irq_of_parse_and_map(gc->of_node, 0);
- if (irq) {
+ irq = platform_get_irq_optional(pdev, 0);
+ if (irq > 0) {
girq = &gc->irq;
girq->chip = &ocelot_irqchip;
girq->parent_handler = ocelot_irq_handler;
--
2.33.0
next prev parent reply other threads:[~2022-03-04 14:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 14:44 [PATCH v2 0/2] pinctrl: ocelot: Add fixes for ocelot driver Horatiu Vultur
2022-03-04 14:44 ` [PATCH v2 1/2] pinctrl: ocelot: Fix the pincfg resource Horatiu Vultur
2022-03-07 12:45 ` Michael Walle
2022-03-08 8:30 ` Horatiu Vultur
2022-03-08 8:31 ` Michael Walle
2022-03-15 0:51 ` Linus Walleij
2022-03-04 14:44 ` Horatiu Vultur [this message]
2022-03-15 0:52 ` [PATCH v2 2/2] pinctrl: ocelot: Fix interrupt parsing 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=20220304144432.3397621-3-horatiu.vultur@microchip.com \
--to=horatiu.vultur@microchip.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=colin.foster@in-advantage.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®