Skip to content

Commit

Permalink
Input: gameport - 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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
geliangtang authored and dtor committed Apr 11, 2017
1 parent c9a9b72 commit d8f2bed
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/input/gameport/gameport.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,8 @@ static void gameport_init_port(struct gameport *gameport)

INIT_LIST_HEAD(&gameport->node);
spin_lock_init(&gameport->timer_lock);
init_timer(&gameport->poll_timer);
gameport->poll_timer.function = gameport_run_poll_handler;
gameport->poll_timer.data = (unsigned long)gameport;
setup_timer(&gameport->poll_timer, gameport_run_poll_handler,
(unsigned long)gameport);
}

/*
Expand Down

0 comments on commit d8f2bed

Please sign in to comment.