[PATCH] Make MODULE_DEVICE_TABLE work for vio devices
[powerpc.git] / drivers / char / vt.c
index e5ef1df..665103c 100644 (file)
@@ -2433,7 +2433,7 @@ static int con_open(struct tty_struct *tty, struct file *filp)
        int ret = 0;
 
        acquire_console_sem();
-       if (tty->count == 1) {
+       if (tty->driver_data == NULL) {
                ret = vc_allocate(currcons);
                if (ret == 0) {
                        struct vc_data *vc = vc_cons[currcons].d;
@@ -2796,7 +2796,7 @@ void do_blank_screen(int entering_gfx)
                return;
 
        if (vesa_off_interval) {
-               blank_state = blank_vesa_wait,
+               blank_state = blank_vesa_wait;
                mod_timer(&console_timer, jiffies + vesa_off_interval);
        }
 
@@ -2867,6 +2867,10 @@ void unblank_screen(void)
  */
 static void blank_screen_t(unsigned long dummy)
 {
+       if (unlikely(!keventd_up())) {
+               mod_timer(&console_timer, jiffies + blankinterval);
+               return;
+       }
        blank_timer_expired = 1;
        schedule_work(&console_work);
 }