From: Ethan Tidmore <ethantidmore06@gmail.com>
To: Linus Walleij <linusw@kernel.org>
Cc: Joshua Henderson <joshua.henderson@microchip.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Ethan Tidmore <ethantidmore06@gmail.com>
Subject: [PATCH v2 2/2] pinctrl: pinctrl-pic32: Use devres version of gpiochip_add_data()
Date: Fri, 27 Feb 2026 15:56:24 -0600 [thread overview]
Message-ID: <20260227215624.1094832-3-ethantidmore06@gmail.com> (raw)
In-Reply-To: <20260227215624.1094832-1-ethantidmore06@gmail.com>
Convert gpiochip_add_data() to devm_gpiochip_add_data() to use devres
style cleanup across entire driver.
Suggested-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
---
v2:
- Made this a series, added this patch.
drivers/pinctrl/pinctrl-pic32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-pic32.c b/drivers/pinctrl/pinctrl-pic32.c
index d185fe48dc0d..07a24e17d35b 100644
--- a/drivers/pinctrl/pinctrl-pic32.c
+++ b/drivers/pinctrl/pinctrl-pic32.c
@@ -2253,7 +2253,7 @@ static int pic32_gpio_probe(struct platform_device *pdev)
girq->default_type = IRQ_TYPE_NONE;
girq->handler = handle_level_irq;
girq->parents[0] = irq;
- ret = gpiochip_add_data(&bank->gpio_chip, bank);
+ ret = devm_gpiochip_add_data(&pdev->dev, &bank->gpio_chip, bank);
if (ret < 0) {
dev_err(&pdev->dev, "Failed to add GPIO chip %u: %d\n",
id, ret);
--
2.53.0
next prev parent reply other threads:[~2026-02-27 21:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 21:56 [PATCH v2 0/2] pinctrl: pinctrl-pic32: Fix resource leak and convert last manual allocation to devres Ethan Tidmore
2026-02-27 21:56 ` [PATCH v2 1/2] pinctrl: pinctrl-pic32: Fix resource leak Ethan Tidmore
2026-02-27 21:56 ` Ethan Tidmore [this message]
2026-03-02 10:16 ` [PATCH v2 0/2] pinctrl: pinctrl-pic32: Fix resource leak and convert last manual allocation to devres 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=20260227215624.1094832-3-ethantidmore06@gmail.com \
--to=ethantidmore06@gmail.com \
--cc=joshua.henderson@microchip.com \
--cc=linusw@kernel.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®