summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/tps6507x-ts.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/touchscreen/tps6507x-ts.c')
-rw-r--r--drivers/input/touchscreen/tps6507x-ts.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c
index 5b70a1419b4d..c8c136cf7bbc 100644
--- a/drivers/input/touchscreen/tps6507x-ts.c
+++ b/drivers/input/touchscreen/tps6507x-ts.c
@@ -335,6 +335,7 @@ static int tps6507x_ts_probe(struct platform_device *pdev)
dev_err(tsc->dev, "schedule failed");
goto err2;
}
+ platform_set_drvdata(pdev, tps6507x_dev);
return 0;
@@ -355,13 +356,10 @@ static int __devexit tps6507x_ts_remove(struct platform_device *pdev)
struct tps6507x_ts *tsc = tps6507x_dev->ts;
struct input_dev *input_dev = tsc->input_dev;
- if (!tsc)
- return 0;
-
cancel_delayed_work_sync(&tsc->work);
destroy_workqueue(tsc->wq);
- input_free_device(input_dev);
+ input_unregister_device(input_dev);
tps6507x_dev->ts = NULL;
kfree(tsc);