Skip to content

Commit c9ccb88

Browse files
goldelicodtor
authored andcommitted
Input: ads7846 - fix gpiod allocation
commit 767d833 ("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: 767d833 ("Input: ads7846 - Convert to use software nodes") Cc: stable@vger.kernel.org Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Link: https://lore.kernel.org/r/6e9b143f19cdfda835711a8a7a3966e5a2494cff.1738410204.git.hns@goldelico.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent c8084a8 commit c9ccb88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/touchscreen/ads7846.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ static int ads7846_setup_pendown(struct spi_device *spi,
10211021
if (pdata->get_pendown_state) {
10221022
ts->get_pendown_state = pdata->get_pendown_state;
10231023
} else {
1024-
ts->gpio_pendown = gpiod_get(&spi->dev, "pendown", GPIOD_IN);
1024+
ts->gpio_pendown = devm_gpiod_get(&spi->dev, "pendown", GPIOD_IN);
10251025
if (IS_ERR(ts->gpio_pendown)) {
10261026
dev_err(&spi->dev, "failed to request pendown GPIO\n");
10271027
return PTR_ERR(ts->gpio_pendown);

0 commit comments

Comments
 (0)