summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/tsc2007.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/touchscreen/tsc2007.c')
-rw-r--r--drivers/input/touchscreen/tsc2007.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c
index be23780e8a3e..cf8a4daee39a 100644
--- a/drivers/input/touchscreen/tsc2007.c
+++ b/drivers/input/touchscreen/tsc2007.c
@@ -295,6 +295,13 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
ts->get_pendown_state = pdata->get_pendown_state;
ts->clear_penirq = pdata->clear_penirq;
+ pdata->init_platform_hw();
+
+ if (tsc2007_xfer(ts, PWRDOWN) < 0) {
+ err = -ENODEV;
+ goto err_no_dev;
+ }
+
snprintf(ts->phys, sizeof(ts->phys),
"%s/input0", dev_name(&client->dev));
@@ -338,6 +345,8 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
pdata->exit_platform_hw();
err_free_mem:
input_free_device(input_dev);
+ err_no_dev:
+ pdata->exit_platform_hw();
kfree(ts);
return err;
}