aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/ad7879.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/ad7879.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/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";