Skip to content

Commit

Permalink
Input: db9 - 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 dd22408 commit c9a9b72
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/input/joystick/db9.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,7 @@ static void db9_attach(struct parport *pp)
db9->pd = pd;
db9->mode = mode;
db9->parportno = pp->number;
init_timer(&db9->timer);
db9->timer.data = (long) db9;
db9->timer.function = db9_timer;
setup_timer(&db9->timer, db9_timer, (long)db9);

for (i = 0; i < (min(db9_mode->n_pads, DB9_MAX_DEVICES)); i++) {

Expand Down

0 comments on commit c9a9b72

Please sign in to comment.