浏览代码

Input: turbografx - use setup_timer

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>
Geliang Tang 8 年之前
父节点
当前提交
bee8449331
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      drivers/input/joystick/turbografx.c

+ 1 - 3
drivers/input/joystick/turbografx.c

@@ -200,9 +200,7 @@ static void tgfx_attach(struct parport *pp)
 	mutex_init(&tgfx->sem);
 	tgfx->pd = pd;
 	tgfx->parportno = pp->number;
-	init_timer(&tgfx->timer);
-	tgfx->timer.data = (long) tgfx;
-	tgfx->timer.function = tgfx_timer;
+	setup_timer(&tgfx->timer, tgfx_timer, (long)tgfx);
 
 	for (i = 0; i < n_devs; i++) {
 		if (n_buttons[i] < 1)