Skip to content

Commit

Permalink
Input: locomokbd - use setup_timer
Browse files Browse the repository at this point in the history
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Geliang Tang authored and Dmitry Torokhov committed Apr 11, 2017
1 parent d8f2bed commit cfecc1e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/input/keyboard/locomokbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,8 @@ static int locomokbd_probe(struct locomo_dev *dev)

spin_lock_init(&locomokbd->lock);

init_timer(&locomokbd->timer);
locomokbd->timer.function = locomokbd_timer_callback;
locomokbd->timer.data = (unsigned long) locomokbd;
setup_timer(&locomokbd->timer, locomokbd_timer_callback,
(unsigned long)locomokbd);

locomokbd->suspend_jiffies = jiffies;

Expand Down

0 comments on commit cfecc1e

Please sign in to comment.