From 8ce73264b75be4d5ed480440ac32dfc1f25ff678 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 1 Jun 2010 22:52:56 +0200 Subject: tty: Move the vt_tty field from the vc_data into the standard tty_port This takes all the tty references through the expected interface points so we can refcount them. Signed-off-by: Alan Cox Cc: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/char/vt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/char/vt.c') diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 295af823a074..c734f9b1263a 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -973,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); } /** @@ -2807,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; @@ -2840,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); } -- cgit v1.2.3-58-ga151