diff options
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r-- | drivers/char/vt.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index c796a86ab7f3..d9113b4c76e3 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -171,8 +171,9 @@ int do_poke_blanked_console; | |||
171 | int console_blanked; | 171 | int console_blanked; |
172 | 172 | ||
173 | static int vesa_blank_mode; /* 0:none 1:suspendV 2:suspendH 3:powerdown */ | 173 | static int vesa_blank_mode; /* 0:none 1:suspendV 2:suspendH 3:powerdown */ |
174 | static int blankinterval = 10*60*HZ; | ||
175 | static int vesa_off_interval; | 174 | static int vesa_off_interval; |
175 | static int blankinterval = 10*60; | ||
176 | core_param(consoleblank, blankinterval, int, 0444); | ||
176 | 177 | ||
177 | static DECLARE_WORK(console_work, console_callback); | 178 | static DECLARE_WORK(console_work, console_callback); |
178 | 179 | ||
@@ -1485,7 +1486,7 @@ static void setterm_command(struct vc_data *vc) | |||
1485 | update_attr(vc); | 1486 | update_attr(vc); |
1486 | break; | 1487 | break; |
1487 | case 9: /* set blanking interval */ | 1488 | case 9: /* set blanking interval */ |
1488 | blankinterval = ((vc->vc_par[1] < 60) ? vc->vc_par[1] : 60) * 60 * HZ; | 1489 | blankinterval = ((vc->vc_par[1] < 60) ? vc->vc_par[1] : 60) * 60; |
1489 | poke_blanked_console(); | 1490 | poke_blanked_console(); |
1490 | break; | 1491 | break; |
1491 | case 10: /* set bell frequency in Hz */ | 1492 | case 10: /* set bell frequency in Hz */ |
@@ -2871,7 +2872,7 @@ static int __init con_init(void) | |||
2871 | 2872 | ||
2872 | if (blankinterval) { | 2873 | if (blankinterval) { |
2873 | blank_state = blank_normal_wait; | 2874 | blank_state = blank_normal_wait; |
2874 | mod_timer(&console_timer, jiffies + blankinterval); | 2875 | mod_timer(&console_timer, jiffies + (blankinterval * HZ)); |
2875 | } | 2876 | } |
2876 | 2877 | ||
2877 | for (currcons = 0; currcons < MIN_NR_CONSOLES; currcons++) { | 2878 | for (currcons = 0; currcons < MIN_NR_CONSOLES; currcons++) { |
@@ -3677,7 +3678,7 @@ void do_unblank_screen(int leaving_gfx) | |||
3677 | return; /* but leave console_blanked != 0 */ | 3678 | return; /* but leave console_blanked != 0 */ |
3678 | 3679 | ||
3679 | if (blankinterval) { | 3680 | if (blankinterval) { |
3680 | mod_timer(&console_timer, jiffies + blankinterval); | 3681 | mod_timer(&console_timer, jiffies + (blankinterval * HZ)); |
3681 | blank_state = blank_normal_wait; | 3682 | blank_state = blank_normal_wait; |
3682 | } | 3683 | } |
3683 | 3684 | ||
@@ -3711,7 +3712,7 @@ void unblank_screen(void) | |||
3711 | static void blank_screen_t(unsigned long dummy) | 3712 | static void blank_screen_t(unsigned long dummy) |
3712 | { | 3713 | { |
3713 | if (unlikely(!keventd_up())) { | 3714 | if (unlikely(!keventd_up())) { |
3714 | mod_timer(&console_timer, jiffies + blankinterval); | 3715 | mod_timer(&console_timer, jiffies + (blankinterval * HZ)); |
3715 | return; | 3716 | return; |
3716 | } | 3717 | } |
3717 | blank_timer_expired = 1; | 3718 | blank_timer_expired = 1; |
@@ -3741,7 +3742,7 @@ void poke_blanked_console(void) | |||
3741 | if (console_blanked) | 3742 | if (console_blanked) |
3742 | unblank_screen(); | 3743 | unblank_screen(); |
3743 | else if (blankinterval) { | 3744 | else if (blankinterval) { |
3744 | mod_timer(&console_timer, jiffies + blankinterval); | 3745 | mod_timer(&console_timer, jiffies + (blankinterval * HZ)); |
3745 | blank_state = blank_normal_wait; | 3746 | blank_state = blank_normal_wait; |
3746 | } | 3747 | } |
3747 | } | 3748 | } |