]> Pileus Git - ~andy/linux/blobdiff - drivers/char/vt.c
Merge branch 'for-linus' of git://neil.brown.name/md
[~andy/linux] / drivers / char / vt.c
index 9f67ad919a4ad775b29a0f3c5fc90415730635f9..c734f9b1263a7d020550f930e3619fb0f7759d80 100644 (file)
@@ -783,6 +783,7 @@ int vc_allocate(unsigned int currcons)      /* return 0 on success */
            if (!vc)
                return -ENOMEM;
            vc_cons[currcons].d = vc;
+           tty_port_init(&vc->port);
            INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
            visual_init(vc, currcons, 1);
            if (!*vc->vc_uni_pagedir_loc)
@@ -972,12 +973,12 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
  *     Resize a virtual console as seen from the console end of things. We
  *     use the common vc_do_resize methods to update the structures. The
  *     caller must hold the console sem to protect console internals and
- *     vc->vc_tty
+ *     vc->port.tty
  */
 
 int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int rows)
 {
-       return vc_do_resize(vc->vc_tty, vc, cols, rows);
+       return vc_do_resize(vc->port.tty, vc, cols, rows);
 }
 
 /**
@@ -2806,12 +2807,12 @@ static int con_open(struct tty_struct *tty, struct file *filp)
                        struct vc_data *vc = vc_cons[currcons].d;
 
                        /* Still being freed */
-                       if (vc->vc_tty) {
+                       if (vc->port.tty) {
                                release_console_sem();
                                return -ERESTARTSYS;
                        }
                        tty->driver_data = vc;
-                       vc->vc_tty = tty;
+                       vc->port.tty = tty;
 
                        if (!tty->winsize.ws_row && !tty->winsize.ws_col) {
                                tty->winsize.ws_row = vc_cons[currcons].d->vc_rows;
@@ -2839,7 +2840,7 @@ static void con_shutdown(struct tty_struct *tty)
        struct vc_data *vc = tty->driver_data;
        BUG_ON(vc == NULL);
        acquire_console_sem();
-       vc->vc_tty = NULL;
+       vc->port.tty = NULL;
        release_console_sem();
        tty_shutdown(tty);
 }
@@ -2921,6 +2922,7 @@ static int __init con_init(void)
        for (currcons = 0; currcons < MIN_NR_CONSOLES; currcons++) {
                vc_cons[currcons].d = vc = kzalloc(sizeof(struct vc_data), GFP_NOWAIT);
                INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
+               tty_port_init(&vc->port);
                visual_init(vc, currcons, 1);
                vc->vc_screenbuf = kzalloc(vc->vc_screenbuf_size, GFP_NOWAIT);
                vc_init(vc, vc->vc_rows, vc->vc_cols,