Skip to content

Commit

Permalink
Input: elants_i2c - fix for devm_gpiod_get API change
Browse files Browse the repository at this point in the history
Flags are now mandatory for devm_gpiod_get(). So let's use proper flag
to configure gpio for output instead of doing this by hand.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
[Dmitry: GPIOD_ASIS -> GPIOD_OUT_LOW]
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Stephen Rothwell authored and Dmitry Torokhov committed Aug 13, 2015
1 parent 71d0f56 commit 7229b87
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions drivers/input/touchscreen/elants_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ static int elants_i2c_probe(struct i2c_client *client,
return error;
}

ts->reset_gpio = devm_gpiod_get(&client->dev, "reset");
ts->reset_gpio = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_LOW);
if (IS_ERR(ts->reset_gpio)) {
error = PTR_ERR(ts->reset_gpio);

Expand All @@ -1188,14 +1188,6 @@ static int elants_i2c_probe(struct i2c_client *client,
}

ts->keep_power_in_suspend = true;
} else {
error = gpiod_direction_output(ts->reset_gpio, 0);
if (error) {
dev_err(&client->dev,
"failed to configure reset gpio as output: %d\n",
error);
return error;
}
}

error = elants_i2c_power_on(ts);
Expand Down

0 comments on commit 7229b87

Please sign in to comment.