Input: db9 - use setup_timer
authorGeliang Tang <geliangtang@gmail.com>
Tue, 11 Apr 2017 03:37:40 +0000 (20:37 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 11 Apr 2017 03:41:38 +0000 (20:41 -0700)
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>
drivers/input/joystick/db9.c

index da326090c2b0e7f07ab4de5668012b1a4d5e92f3..f4ad83eab67f66c7a6ebfa956976e02668e9e32a 100644 (file)
@@ -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++) {