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>
This commit is contained in:
Kees Cook
2017-10-24 09:44:48 -07:00
committed by Dmitry Torokhov
parent 4ea40278eb
commit ee03e3f005
5 changed files with 18 additions and 18 deletions
+3 -3
View File
@@ -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";