diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-02-12 03:52:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:30 -0500 |
commit | 40565f1962c5be9b9e285e05af01ab7771534868 (patch) | |
tree | ae84097778a8adfc5a9aad8a5428fe803d54346a /drivers/char/vt.c | |
parent | d096f3e9898d469493fc0afe88d7285c4bdc3ce2 (diff) |
[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 <jirislaby@gmail.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Kylene Jo Hall <kjhall@us.ibm.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Dmitry Torokhov <dtor@mail.ru> (Input bits)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r-- | drivers/char/vt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 13299b8fdbd6..d6694163b6f1 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -210,7 +210,7 @@ static int scrollback_delta; | |||
210 | */ | 210 | */ |
211 | int (*console_blank_hook)(int); | 211 | int (*console_blank_hook)(int); |
212 | 212 | ||
213 | static struct timer_list console_timer; | 213 | static DEFINE_TIMER(console_timer, blank_screen_t, 0, 0); |
214 | static int blank_state; | 214 | static int blank_state; |
215 | static int blank_timer_expired; | 215 | static int blank_timer_expired; |
216 | enum { | 216 | enum { |
@@ -2625,8 +2625,6 @@ static int __init con_init(void) | |||
2625 | for (i = 0; i < MAX_NR_CONSOLES; i++) | 2625 | for (i = 0; i < MAX_NR_CONSOLES; i++) |
2626 | con_driver_map[i] = conswitchp; | 2626 | con_driver_map[i] = conswitchp; |
2627 | 2627 | ||
2628 | init_timer(&console_timer); | ||
2629 | console_timer.function = blank_screen_t; | ||
2630 | if (blankinterval) { | 2628 | if (blankinterval) { |
2631 | blank_state = blank_normal_wait; | 2629 | blank_state = blank_normal_wait; |
2632 | mod_timer(&console_timer, jiffies + blankinterval); | 2630 | mod_timer(&console_timer, jiffies + blankinterval); |