summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorSudhakar Manapati <smanap@codeaurora.org>2015-08-12 12:32:27 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-08-21 21:12:17 -0700
commita80c7960f1e098e5de43eae1a420a5576cd7a73a (patch)
treee0a4d521edc7b3baa043d89bd943e0b19f0752bb /drivers/input/touchscreen
parentaf3203fa14b9c7fac5fe5d93bc10d84ceb693438 (diff)
input: ft5x06_ts: remove deprecated apis in 3.18 kernel
This patch removes the usage of deprecated apis like usleep(), __devexit_p, etc. This is a propagated patch from 3.18 kernel 'commit 20482b216b8a ("input: ft5x06_ts: remove deprecated apis in 3.18 kernel")' Change-Id: I77cedabdb234a643f96427f051038faad31bfdcf Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/ft5x06_ts.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/ft5x06_ts.c b/drivers/input/touchscreen/ft5x06_ts.c
index 4d046f690a57..c0e756fc59f9 100644
--- a/drivers/input/touchscreen/ft5x06_ts.c
+++ b/drivers/input/touchscreen/ft5x06_ts.c
@@ -405,7 +405,11 @@ power_off:
if (rc) {
dev_err(&data->client->dev,
"Regulator vcc_i2c disable failed rc=%d\n", rc);
- regulator_enable(data->vdd);
+ rc = regulator_enable(data->vdd);
+ if (rc) {
+ dev_err(&data->client->dev,
+ "Regulator vdd enable failed rc=%d\n", rc);
+ }
}
return rc;
@@ -714,7 +718,7 @@ static int ft5x06_fw_upgrade_start(struct i2c_client *client,
/* Enter upgrade mode */
w_buf[0] = FT_UPGRADE_55;
ft5x06_i2c_write(client, w_buf, 1);
- usleep(FT_55_AA_DLY_NS);
+ usleep_range(FT_55_AA_DLY_NS, FT_55_AA_DLY_NS + 1);
w_buf[0] = FT_UPGRADE_AA;
ft5x06_i2c_write(client, w_buf, 1);
@@ -1462,7 +1466,7 @@ static int ft5x06_ts_probe(struct i2c_client *client,
__set_bit(BTN_TOUCH, input_dev->keybit);
__set_bit(INPUT_PROP_DIRECT, input_dev->propbit);
- input_mt_init_slots(input_dev, pdata->num_max_touches);
+ input_mt_init_slots(input_dev, pdata->num_max_touches, 0);
input_set_abs_params(input_dev, ABS_MT_POSITION_X, pdata->x_min,
pdata->x_max, 0, 0);
input_set_abs_params(input_dev, ABS_MT_POSITION_Y, pdata->y_min,
@@ -1755,7 +1759,7 @@ static const struct of_device_id ft5x06_match_table[] = {
static struct i2c_driver ft5x06_ts_driver = {
.probe = ft5x06_ts_probe,
- .remove = __devexit_p(ft5x06_ts_remove),
+ .remove = ft5x06_ts_remove,
.driver = {
.name = "ft5x06_ts",
.owner = THIS_MODULE,