aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/tsc200x-core.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-24 09:44:48 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-10-24 10:09:33 -0700
commitee03e3f00566201ea91d90430dc43bd08c7e9eef (patch)
tree683c6c65583c06d643bf6a42b39d05b36a8bd239 /drivers/input/touchscreen/tsc200x-core.c
parentInput: keyboard - convert timers to use timer_setup() (diff)
downloadlinux-dev-ee03e3f00566201ea91d90430dc43bd08c7e9eef.tar.xz
linux-dev-ee03e3f00566201ea91d90430dc43bd08c7e9eef.zip
Input: touchsceen - convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/tsc200x-core.c')
-rw-r--r--drivers/input/touchscreen/tsc200x-core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/tsc200x-core.c b/drivers/input/touchscreen/tsc200x-core.c
index 88ea5e1b72ae..542db26d7fd0 100644
--- a/drivers/input/touchscreen/tsc200x-core.c
+++ b/drivers/input/touchscreen/tsc200x-core.c
@@ -202,9 +202,9 @@ out:
return IRQ_HANDLED;
}
-static void tsc200x_penup_timer(unsigned long data)
+static void tsc200x_penup_timer(struct timer_list *t)
{
- struct tsc200x *ts = (struct tsc200x *)data;
+ struct tsc200x *ts = from_timer(ts, t, penup_timer);
unsigned long flags;
spin_lock_irqsave(&ts->lock, flags);
@@ -506,7 +506,7 @@ int tsc200x_probe(struct device *dev, int irq, const struct input_id *tsc_id,
mutex_init(&ts->mutex);
spin_lock_init(&ts->lock);
- setup_timer(&ts->penup_timer, tsc200x_penup_timer, (unsigned long)ts);
+ timer_setup(&ts->penup_timer, tsc200x_penup_timer, 0);
INIT_DELAYED_WORK(&ts->esd_work, tsc200x_esd_work);