summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/ucb1x00-ts.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c
index 7772bd1d92b4..38e815a2e871 100644
--- a/drivers/mfd/ucb1x00-ts.c
+++ b/drivers/mfd/ucb1x00-ts.c
@@ -291,7 +291,7 @@ static void ucb1x00_ts_irq(int idx, void *id)
static int ucb1x00_ts_open(struct input_dev *idev)
{
- struct ucb1x00_ts *ts = idev->private;
+ struct ucb1x00_ts *ts = input_get_drvdata(idev);
int ret = 0;
BUG_ON(ts->rtask);
@@ -328,7 +328,7 @@ static int ucb1x00_ts_open(struct input_dev *idev)
*/
static void ucb1x00_ts_close(struct input_dev *idev)
{
- struct ucb1x00_ts *ts = idev->private;
+ struct ucb1x00_ts *ts = input_get_drvdata(idev);
if (ts->rtask)
kthread_stop(ts->rtask);
@@ -380,7 +380,6 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev)
ts->idev = idev;
ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC;
- idev->private = ts;
idev->name = "Touchscreen panel";
idev->id.product = ts->ucb->id;
idev->open = ucb1x00_ts_open;
@@ -391,6 +390,8 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev)
__set_bit(ABS_Y, idev->absbit);
__set_bit(ABS_PRESSURE, idev->absbit);
+ input_set_drvdata(idev, ts);
+
err = input_register_device(idev);
if (err)
goto fail;