summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2015-08-09 22:37:46 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-08-13 16:05:02 -0700
commit7229b87bb269c9e18cabbc43c5fb01c81d097b24 (patch)
tree007d74e30d3c820a947ff4975289624cbf29c5e1 /drivers/input
parent71d0f562358c3274e78ef371dfeb71ad5e86cb91 (diff)
downloadblackbird-op-linux-7229b87bb269c9e18cabbc43c5fb01c81d097b24.tar.gz
blackbird-op-linux-7229b87bb269c9e18cabbc43c5fb01c81d097b24.zip
Input: elants_i2c - fix for devm_gpiod_get API change
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>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/elants_i2c.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
index 6f7155641591..ddac134b25b1 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -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);
@@ -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);
OpenPOWER on IntegriCloud