diff options
author | Alan Cox <alan@linux.intel.com> | 2010-06-01 16:52:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 16:47:42 -0400 |
commit | 8ce73264b75be4d5ed480440ac32dfc1f25ff678 (patch) | |
tree | d604eda549bee636d8132994496ba2f1406fb8f1 /drivers/char/vt.c | |
parent | ff917ba4f1a6189f90ed2c975984d6a1a1dc553d (diff) |
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 <alan@linux.intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r-- | drivers/char/vt.c | 10 |
1 files changed, 5 insertions, 5 deletions
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, | |||
973 | * Resize a virtual console as seen from the console end of things. We | 973 | * Resize a virtual console as seen from the console end of things. We |
974 | * use the common vc_do_resize methods to update the structures. The | 974 | * use the common vc_do_resize methods to update the structures. The |
975 | * caller must hold the console sem to protect console internals and | 975 | * caller must hold the console sem to protect console internals and |
976 | * vc->vc_tty | 976 | * vc->port.tty |
977 | */ | 977 | */ |
978 | 978 | ||
979 | int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int rows) | 979 | int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int rows) |
980 | { | 980 | { |
981 | return vc_do_resize(vc->vc_tty, vc, cols, rows); | 981 | return vc_do_resize(vc->port.tty, vc, cols, rows); |
982 | } | 982 | } |
983 | 983 | ||
984 | /** | 984 | /** |
@@ -2807,12 +2807,12 @@ static int con_open(struct tty_struct *tty, struct file *filp) | |||
2807 | struct vc_data *vc = vc_cons[currcons].d; | 2807 | struct vc_data *vc = vc_cons[currcons].d; |
2808 | 2808 | ||
2809 | /* Still being freed */ | 2809 | /* Still being freed */ |
2810 | if (vc->vc_tty) { | 2810 | if (vc->port.tty) { |
2811 | release_console_sem(); | 2811 | release_console_sem(); |
2812 | return -ERESTARTSYS; | 2812 | return -ERESTARTSYS; |
2813 | } | 2813 | } |
2814 | tty->driver_data = vc; | 2814 | tty->driver_data = vc; |
2815 | vc->vc_tty = tty; | 2815 | vc->port.tty = tty; |
2816 | 2816 | ||
2817 | if (!tty->winsize.ws_row && !tty->winsize.ws_col) { | 2817 | if (!tty->winsize.ws_row && !tty->winsize.ws_col) { |
2818 | tty->winsize.ws_row = vc_cons[currcons].d->vc_rows; | 2818 | tty->winsize.ws_row = vc_cons[currcons].d->vc_rows; |
@@ -2840,7 +2840,7 @@ static void con_shutdown(struct tty_struct *tty) | |||
2840 | struct vc_data *vc = tty->driver_data; | 2840 | struct vc_data *vc = tty->driver_data; |
2841 | BUG_ON(vc == NULL); | 2841 | BUG_ON(vc == NULL); |
2842 | acquire_console_sem(); | 2842 | acquire_console_sem(); |
2843 | vc->vc_tty = NULL; | 2843 | vc->port.tty = NULL; |
2844 | release_console_sem(); | 2844 | release_console_sem(); |
2845 | tty_shutdown(tty); | 2845 | tty_shutdown(tty); |
2846 | } | 2846 | } |