summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ad7879.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-24 19:44:48 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-10-24 20:09:33 +0300
commitee03e3f00566201ea91d90430dc43bd08c7e9eef (patch)
tree683c6c65583c06d643bf6a42b39d05b36a8bd239 /drivers/input/touchscreen/ad7879.c
parent4ea40278eb463aaa95889b00be78f8a56bb61131 (diff)
downloadlinux-ee03e3f00566201ea91d90430dc43bd08c7e9eef.tar.xz
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/ad7879.c')
-rw-r--r--drivers/input/touchscreen/ad7879.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c
index 7d74a0ae2c94..6bad23ee47a1 100644
--- a/drivers/input/touchscreen/ad7879.c
+++ b/drivers/input/touchscreen/ad7879.c
@@ -237,9 +237,9 @@ static void ad7879_ts_event_release(struct ad7879 *ts)
input_sync(input_dev);
}
-static void ad7879_timer(unsigned long handle)
+static void ad7879_timer(struct timer_list *t)
{
- struct ad7879 *ts = (void *)handle;
+ struct ad7879 *ts = from_timer(ts, t, timer);
ad7879_ts_event_release(ts);
}
@@ -570,7 +570,7 @@ int ad7879_probe(struct device *dev, struct regmap *regmap,
ts->irq = irq;
ts->regmap = regmap;
- setup_timer(&ts->timer, ad7879_timer, (unsigned long) ts);
+ timer_setup(&ts->timer, ad7879_timer, 0);
snprintf(ts->phys, sizeof(ts->phys), "%s/input0", dev_name(dev));
input_dev->name = "AD7879 Touchscreen";