diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-24 09:44:48 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-10-24 10:09:33 -0700 |
commit | ee03e3f00566201ea91d90430dc43bd08c7e9eef (patch) | |
tree | 683c6c65583c06d643bf6a42b39d05b36a8bd239 /drivers/input/touchscreen/cyttsp4_core.c | |
parent | 4ea40278eb463aaa95889b00be78f8a56bb61131 (diff) | |
download | linux-ee03e3f00566201ea91d90430dc43bd08c7e9eef.tar.bz2 |
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/cyttsp4_core.c')
-rw-r--r-- | drivers/input/touchscreen/cyttsp4_core.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c index beaf61ce775b..e7710397e0ad 100644 --- a/drivers/input/touchscreen/cyttsp4_core.c +++ b/drivers/input/touchscreen/cyttsp4_core.c @@ -1237,9 +1237,9 @@ static void cyttsp4_stop_wd_timer(struct cyttsp4 *cd) del_timer_sync(&cd->watchdog_timer); } -static void cyttsp4_watchdog_timer(unsigned long handle) +static void cyttsp4_watchdog_timer(struct timer_list *t) { - struct cyttsp4 *cd = (struct cyttsp4 *)handle; + struct cyttsp4 *cd = from_timer(cd, t, watchdog_timer); dev_vdbg(cd->dev, "%s: Watchdog timer triggered\n", __func__); @@ -2074,8 +2074,7 @@ struct cyttsp4 *cyttsp4_probe(const struct cyttsp4_bus_ops *ops, } /* Setup watchdog timer */ - setup_timer(&cd->watchdog_timer, cyttsp4_watchdog_timer, - (unsigned long)cd); + timer_setup(&cd->watchdog_timer, cyttsp4_watchdog_timer, 0); /* * call startup directly to ensure that the device |