summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/w90p910_ts.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-24 18:44:48 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-10-24 19:09:33 +0200
commitee03e3f00566201ea91d90430dc43bd08c7e9eef (patch)
tree683c6c65583c06d643bf6a42b39d05b36a8bd239 /drivers/input/touchscreen/w90p910_ts.c
parentInput: keyboard - convert timers to use timer_setup() (diff)
downloadlinux-ee03e3f00566201ea91d90430dc43bd08c7e9eef.tar.xz
linux-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/w90p910_ts.c')
-rw-r--r--drivers/input/touchscreen/w90p910_ts.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/w90p910_ts.c b/drivers/input/touchscreen/w90p910_ts.c
index da6004e97753..638c1d78ca3a 100644
--- a/drivers/input/touchscreen/w90p910_ts.c
+++ b/drivers/input/touchscreen/w90p910_ts.c
@@ -146,9 +146,9 @@ static irqreturn_t w90p910_ts_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static void w90p910_check_pen_up(unsigned long data)
+static void w90p910_check_pen_up(struct timer_list *t)
{
- struct w90p910_ts *w90p910_ts = (struct w90p910_ts *) data;
+ struct w90p910_ts *w90p910_ts = from_timer(w90p910_ts, t, timer);
unsigned long flags;
spin_lock_irqsave(&w90p910_ts->lock, flags);
@@ -232,8 +232,7 @@ static int w90x900ts_probe(struct platform_device *pdev)
w90p910_ts->input = input_dev;
w90p910_ts->state = TS_IDLE;
spin_lock_init(&w90p910_ts->lock);
- setup_timer(&w90p910_ts->timer, w90p910_check_pen_up,
- (unsigned long)w90p910_ts);
+ timer_setup(&w90p910_ts->timer, w90p910_check_pen_up, 0);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {