mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-22 17:33:01 +00:00
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>
This commit is contained in:
parent
47af45d684
commit
5cab4d8478
@ -464,7 +464,7 @@ static int silead_ts_probe(struct i2c_client *client,
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
/* Power GPIO pin */
|
/* 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 (IS_ERR(data->gpio_power)) {
|
||||||
if (PTR_ERR(data->gpio_power) != -EPROBE_DEFER)
|
if (PTR_ERR(data->gpio_power) != -EPROBE_DEFER)
|
||||||
dev_err(dev, "Shutdown GPIO request failed\n");
|
dev_err(dev, "Shutdown GPIO request failed\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user