diff options
author | Alan Cox <alan@linux.intel.com> | 2010-06-01 22:52:55 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 13:47:41 -0700 |
commit | ff917ba4f1a6189f90ed2c975984d6a1a1dc553d (patch) | |
tree | a53853d16c578dafee829ebe7645e724d184fab9 /drivers/char/vt.c | |
parent | e33ac1c10b6baaac68d18d931e120d8b96e8c5f8 (diff) | |
download | blackbird-obmc-linux-ff917ba4f1a6189f90ed2c975984d6a1a1dc553d.tar.gz blackbird-obmc-linux-ff917ba4f1a6189f90ed2c975984d6a1a1dc553d.zip |
tty: Make vt's have a tty_port
The vt layer isn't safely handling reference counts to tty object on the input
side. Add a tty port structure to the vt layer in order to implement this using
the standard helpers.
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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 9f67ad919a4a..295af823a074 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -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) @@ -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, |