Thread (1 message) 1 message, 1 author, 2016-08-22

[PATCH] input: touchscreen: silead: Use devm_gpiod_get

From: dmitry.torokhov@gmail.com (Dmitry Torokhov)
Date: 2016-08-22 21:12:00
Also in: linux-devicetree, linux-input

Possibly related (same subject, not in this thread)

On Tue, Aug 16, 2016 at 11:47:23PM +0200, Hans de Goede wrote:
The silead code is using devm_foo for everything (and does not free
any resources). Except that it is using gpiod_get instead of
devm_gpiod_get (but is not freeing the gpio_desc), change this
to use devm_gpiod_get so that the gpio will be properly released.

Signed-off-by: Hans de Goede <redacted>
Applied, thank you.
quoted hunk
---
 drivers/input/touchscreen/silead.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c
index 04992c5..3b80f14 100644
--- a/drivers/input/touchscreen/silead.c
+++ b/drivers/input/touchscreen/silead.c
@@ -497,7 +497,7 @@ static int silead_ts_probe(struct i2c_client *client,
 	}
 
 	/* Power GPIO pin */
-	data->gpio_power = gpiod_get_optional(dev, "power", GPIOD_OUT_LOW);
+	data->gpio_power = devm_gpiod_get_optional(dev, "power", GPIOD_OUT_LOW);
 	if (IS_ERR(data->gpio_power)) {
 		if (PTR_ERR(data->gpio_power) != -EPROBE_DEFER)
 			dev_err(dev, "Shutdown GPIO request failed\n");
-- 
2.7.4
-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help