aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-08-21 14:40:11 +0200
committerLinus Walleij <linus.walleij@linaro.org>2019-08-21 14:40:11 +0200
commit86c36cd2c42f4837e737f0a02badb9322e30e8b2 (patch)
tree49b822c20e987b6303df5cec9bc7abb75a4a7764
parent527b95dec953c20999c5d909f7099c6607ba520d (diff)
downloadlinux-stericsson-bu21015.tar.gz
fixesbu21015
-rw-r--r--drivers/input/touchscreen/bu21013_ts.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/input/touchscreen/bu21013_ts.c b/drivers/input/touchscreen/bu21013_ts.c
index c89a00a6e67c..bdae4cd4243a 100644
--- a/drivers/input/touchscreen/bu21013_ts.c
+++ b/drivers/input/touchscreen/bu21013_ts.c
@@ -390,18 +390,18 @@ static int bu21013_init_chip(struct bu21013_ts *ts)
return 0;
}
-static void bu21013_power_off(void *_ts)
+static void bu21013_power_off(void *data)
{
- struct bu21013_ts *ts = ts;
+ struct regulator *regulator = data;
- regulator_disable(ts->regulator);
+ regulator_disable(regulator);
}
-static void bu21013_disable_chip(void *_ts)
+static void bu21013_disable_chip(void *data)
{
- struct bu21013_ts *ts = ts;
+ struct gpio_desc *gpiod = data;
- gpiod_set_value(ts->cs_gpiod, 0);
+ gpiod_set_value(gpiod, 0);
}
static int bu21013_probe(struct i2c_client *client,
@@ -488,7 +488,8 @@ static int bu21013_probe(struct i2c_client *client,
return error;
}
- error = devm_add_action_or_reset(&client->dev, bu21013_power_off, ts);
+ error = devm_add_action_or_reset(&client->dev, bu21013_power_off,
+ ts->regulator);
if (error) {
dev_err(&client->dev, "failed to install power off handler\n");
return error;
@@ -505,7 +506,7 @@ static int bu21013_probe(struct i2c_client *client,
gpiod_set_consumer_name(ts->cs_gpiod, "BU21013 CS");
error = devm_add_action_or_reset(&client->dev,
- bu21013_disable_chip, ts);
+ bu21013_disable_chip, ts->cs_gpiod);
if (error) {
dev_err(&client->dev,
"failed to install chip disable handler\n");