diff options
author | Hans de Goede <hdegoede@redhat.com> | 2016-08-22 16:49:59 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-08-22 17:14:15 -0400 |
commit | 5cab4d84780573afbf5077ae9c3f919b4f305f20 (patch) | |
tree | 6080ad6360397ee32a6aee8b5fb8b539390cd7de /drivers/input | |
parent | 47af45d684b5f3ae000ad448db02ce4f13f73273 (diff) |
Input: silead - use devm_gpiod_get
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 <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/silead.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c index 7379fe153cf9..b2744a64e933 100644 --- a/drivers/input/touchscreen/silead.c +++ b/drivers/input/touchscreen/silead.c | |||
@@ -464,7 +464,7 @@ static int silead_ts_probe(struct i2c_client *client, | |||
464 | return -ENODEV; | 464 | return -ENODEV; |
465 | 465 | ||
466 | /* Power GPIO pin */ | 466 | /* Power GPIO pin */ |
467 | data->gpio_power = gpiod_get_optional(dev, "power", GPIOD_OUT_LOW); | 467 | data->gpio_power = devm_gpiod_get_optional(dev, "power", GPIOD_OUT_LOW); |
468 | if (IS_ERR(data->gpio_power)) { | 468 | if (IS_ERR(data->gpio_power)) { |
469 | if (PTR_ERR(data->gpio_power) != -EPROBE_DEFER) | 469 | if (PTR_ERR(data->gpio_power) != -EPROBE_DEFER) |
470 | dev_err(dev, "Shutdown GPIO request failed\n"); | 470 | dev_err(dev, "Shutdown GPIO request failed\n"); |