* [PATCH] Input: ads7846 - fix gpiod allocation
@ 2025-02-01 11:43 H. Nikolaus Schaller
2025-02-03 12:38 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: H. Nikolaus Schaller @ 2025-02-01 11:43 UTC (permalink / raw)
To: Dmitry Torokhov, Marek Vasut, Linus Walleij, H. Nikolaus Schaller,
Nathan Chancellor
Cc: linux-input, linux-kernel, letux-kernel, stable
commit 767d83361aaa ("Input: ads7846 - Convert to use software nodes")
has simplified the code but accidentially converted a devm_gpiod_get()
to gpiod_get(). This leaves the gpio reserved on module remove and the
driver can no longer be loaded again.
Fixes: 767d83361aaa ("Input: ads7846 - Convert to use software nodes")
Cc: <stable@vger.kernel.org>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
drivers/input/touchscreen/ads7846.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 066dc04003fa8..67264c5b49cb4 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1021,7 +1021,7 @@ static int ads7846_setup_pendown(struct spi_device *spi,
if (pdata->get_pendown_state) {
ts->get_pendown_state = pdata->get_pendown_state;
} else {
- ts->gpio_pendown = gpiod_get(&spi->dev, "pendown", GPIOD_IN);
+ ts->gpio_pendown = devm_gpiod_get(&spi->dev, "pendown", GPIOD_IN);
if (IS_ERR(ts->gpio_pendown)) {
dev_err(&spi->dev, "failed to request pendown GPIO\n");
return PTR_ERR(ts->gpio_pendown);
--
2.47.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Input: ads7846 - fix gpiod allocation
2025-02-01 11:43 [PATCH] Input: ads7846 - fix gpiod allocation H. Nikolaus Schaller
@ 2025-02-03 12:38 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2025-02-03 12:38 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Marek Vasut, Linus Walleij, Nathan Chancellor, linux-input,
linux-kernel, letux-kernel, stable
On Sat, Feb 01, 2025 at 12:43:24PM +0100, H. Nikolaus Schaller wrote:
> commit 767d83361aaa ("Input: ads7846 - Convert to use software nodes")
>
> has simplified the code but accidentially converted a devm_gpiod_get()
> to gpiod_get(). This leaves the gpio reserved on module remove and the
> driver can no longer be loaded again.
>
> Fixes: 767d83361aaa ("Input: ads7846 - Convert to use software nodes")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-03 12:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-01 11:43 [PATCH] Input: ads7846 - fix gpiod allocation H. Nikolaus Schaller
2025-02-03 12:38 ` Dmitry Torokhov
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).