From 40565f1962c5be9b9e285e05af01ab7771534868 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 12 Feb 2007 00:52:31 -0800 Subject: [PATCH] Char: timers cleanup - Use timer macros to set function and data members and to modify expiration time. - Use DEFINE_TIMER for global timers and do not init them at run-time in these cases. - del_timer_sync is common in most cases -- we want to wait for timer function if it's still running. Signed-off-by: Jiri Slaby Cc: Dave Airlie Cc: David Woodhouse Cc: Dominik Brodowski Cc: Alessandro Zummo Cc: Paul Fulghum Cc: Kylene Jo Hall Cc: Wim Van Sebroeck Acked-by: Dmitry Torokhov (Input bits) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/vt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/char/vt.c') diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 13299b8..d669416 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -210,7 +210,7 @@ static int scrollback_delta; */ int (*console_blank_hook)(int); -static struct timer_list console_timer; +static DEFINE_TIMER(console_timer, blank_screen_t, 0, 0); static int blank_state; static int blank_timer_expired; enum { @@ -2625,8 +2625,6 @@ static int __init con_init(void) for (i = 0; i < MAX_NR_CONSOLES; i++) con_driver_map[i] = conswitchp; - init_timer(&console_timer); - console_timer.function = blank_screen_t; if (blankinterval) { blank_state = blank_normal_wait; mod_timer(&console_timer, jiffies + blankinterval); -- cgit v1.1