video/console: use setup_timer and mod_timer instead of init_timer
authorJan Stourac <xstourac@gmail.com>
Wed, 8 Feb 2017 15:43:59 +0000 (16:43 +0100)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Wed, 8 Feb 2017 15:43:59 +0000 (16:43 +0100)
Use setup_timer and mod_timer functions instead of initializing timer with
the function init_timer and data fields.

Signed-off-by: Jan Stourac <xstourac@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/console/fbcon.c

index f4daadff8a6c17450582db2c85b96c634f7c30fc..12ded23f1aaff70a136114e78d58b3efdfaddc37 100644 (file)
@@ -412,11 +412,9 @@ static void fbcon_add_cursor_timer(struct fb_info *info)
                if (!info->queue.func)
                        INIT_WORK(&info->queue, fb_flashcursor);
 
-               init_timer(&ops->cursor_timer);
-               ops->cursor_timer.function = cursor_timer_handler;
-               ops->cursor_timer.expires = jiffies + ops->cur_blink_jiffies;
-               ops->cursor_timer.data = (unsigned long ) info;
-               add_timer(&ops->cursor_timer);
+               setup_timer(&ops->cursor_timer, cursor_timer_handler,
+                           (unsigned long) info);
+               mod_timer(&ops->cursor_timer, jiffies + ops->cur_blink_jiffies);
                ops->flags |= FBCON_FLAGS_CURSOR_TIMER;
        }
 }