[<prev] [next>] [day] [month] [year] [list]
Message-ID: <6e9b143f19cdfda835711a8a7a3966e5a2494cff.1738410204.git.hns@goldelico.com>
Date: Sat, 1 Feb 2025 12:43:24 +0100
From: "H. Nikolaus Schaller" <hns@...delico.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Marek Vasut <marex@...x.de>,
Linus Walleij <linus.walleij@...aro.org>,
"H. Nikolaus Schaller" <hns@...delico.com>,
Nathan Chancellor <nathan@...nel.org>
Cc: linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org,
letux-kernel@...nphoenux.org,
stable@...r.kernel.org
Subject: [PATCH] Input: ads7846 - fix gpiod allocation
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@...r.kernel.org>
Signed-off-by: H. Nikolaus Schaller <hns@...delico.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
Powered by blists - more mailing lists