diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-24 09:40:57 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-10-24 10:04:44 -0700 |
commit | 4ea40278eb463aaa95889b00be78f8a56bb61131 (patch) | |
tree | 974f097739023f20473f495db31b6ffae20df826 /drivers/input/keyboard/locomokbd.c | |
parent | a11bc476b987925654369411dd8281a60cb5a175 (diff) |
Input: keyboard - 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/keyboard/locomokbd.c')
-rw-r--r-- | drivers/input/keyboard/locomokbd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c index 0d74312d5b02..30d610758595 100644 --- a/drivers/input/keyboard/locomokbd.c +++ b/drivers/input/keyboard/locomokbd.c @@ -210,9 +210,9 @@ static irqreturn_t locomokbd_interrupt(int irq, void *dev_id) /* * LoCoMo timer checking for released keys */ -static void locomokbd_timer_callback(unsigned long data) +static void locomokbd_timer_callback(struct timer_list *t) { - struct locomokbd *locomokbd = (struct locomokbd *) data; + struct locomokbd *locomokbd = from_timer(locomokbd, t, timer); locomokbd_scankeyboard(locomokbd); } @@ -264,8 +264,7 @@ static int locomokbd_probe(struct locomo_dev *dev) spin_lock_init(&locomokbd->lock); - setup_timer(&locomokbd->timer, locomokbd_timer_callback, - (unsigned long)locomokbd); + timer_setup(&locomokbd->timer, locomokbd_timer_callback, 0); locomokbd->suspend_jiffies = jiffies; |