diff options
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r-- | drivers/tty/vt/consolemap.c | 6 | ||||
-rw-r--r-- | drivers/tty/vt/selection.c | 9 | ||||
-rw-r--r-- | drivers/tty/vt/vt.c | 5 | ||||
-rw-r--r-- | drivers/tty/vt/vt_ioctl.c | 1 |
4 files changed, 9 insertions, 12 deletions
diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c index 2aaa0c22840..248381b3072 100644 --- a/drivers/tty/vt/consolemap.c +++ b/drivers/tty/vt/consolemap.c | |||
@@ -410,10 +410,8 @@ static void con_release_unimap(struct uni_pagedir *p) | |||
410 | kfree(p->inverse_translations[i]); | 410 | kfree(p->inverse_translations[i]); |
411 | p->inverse_translations[i] = NULL; | 411 | p->inverse_translations[i] = NULL; |
412 | } | 412 | } |
413 | if (p->inverse_trans_unicode) { | 413 | kfree(p->inverse_trans_unicode); |
414 | kfree(p->inverse_trans_unicode); | 414 | p->inverse_trans_unicode = NULL; |
415 | p->inverse_trans_unicode = NULL; | ||
416 | } | ||
417 | } | 415 | } |
418 | 416 | ||
419 | /* Caller must hold the console lock */ | 417 | /* Caller must hold the console lock */ |
diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c index 8e9b4be97a2..60b7b692605 100644 --- a/drivers/tty/vt/selection.c +++ b/drivers/tty/vt/selection.c | |||
@@ -341,15 +341,11 @@ int paste_selection(struct tty_struct *tty) | |||
341 | struct tty_ldisc *ld; | 341 | struct tty_ldisc *ld; |
342 | DECLARE_WAITQUEUE(wait, current); | 342 | DECLARE_WAITQUEUE(wait, current); |
343 | 343 | ||
344 | |||
345 | console_lock(); | 344 | console_lock(); |
346 | poke_blanked_console(); | 345 | poke_blanked_console(); |
347 | console_unlock(); | 346 | console_unlock(); |
348 | 347 | ||
349 | /* FIXME: wtf is this supposed to achieve ? */ | 348 | ld = tty_ldisc_ref_wait(tty); |
350 | ld = tty_ldisc_ref(tty); | ||
351 | if (!ld) | ||
352 | ld = tty_ldisc_ref_wait(tty); | ||
353 | 349 | ||
354 | /* FIXME: this is completely unsafe */ | 350 | /* FIXME: this is completely unsafe */ |
355 | add_wait_queue(&vc->paste_wait, &wait); | 351 | add_wait_queue(&vc->paste_wait, &wait); |
@@ -361,8 +357,7 @@ int paste_selection(struct tty_struct *tty) | |||
361 | } | 357 | } |
362 | count = sel_buffer_lth - pasted; | 358 | count = sel_buffer_lth - pasted; |
363 | count = min(count, tty->receive_room); | 359 | count = min(count, tty->receive_room); |
364 | tty->ldisc->ops->receive_buf(tty, sel_buffer + pasted, | 360 | ld->ops->receive_buf(tty, sel_buffer + pasted, NULL, count); |
365 | NULL, count); | ||
366 | pasted += count; | 361 | pasted += count; |
367 | } | 362 | } |
368 | remove_wait_queue(&vc->paste_wait, &wait); | 363 | remove_wait_queue(&vc->paste_wait, &wait); |
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 4e0d0c3734b..8fd89687d06 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c | |||
@@ -779,6 +779,7 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */ | |||
779 | con_set_default_unimap(vc); | 779 | con_set_default_unimap(vc); |
780 | vc->vc_screenbuf = kmalloc(vc->vc_screenbuf_size, GFP_KERNEL); | 780 | vc->vc_screenbuf = kmalloc(vc->vc_screenbuf_size, GFP_KERNEL); |
781 | if (!vc->vc_screenbuf) { | 781 | if (!vc->vc_screenbuf) { |
782 | tty_port_destroy(&vc->port); | ||
782 | kfree(vc); | 783 | kfree(vc); |
783 | vc_cons[currcons].d = NULL; | 784 | vc_cons[currcons].d = NULL; |
784 | return -ENOMEM; | 785 | return -ENOMEM; |
@@ -999,8 +1000,10 @@ void vc_deallocate(unsigned int currcons) | |||
999 | put_pid(vc->vt_pid); | 1000 | put_pid(vc->vt_pid); |
1000 | module_put(vc->vc_sw->owner); | 1001 | module_put(vc->vc_sw->owner); |
1001 | kfree(vc->vc_screenbuf); | 1002 | kfree(vc->vc_screenbuf); |
1002 | if (currcons >= MIN_NR_CONSOLES) | 1003 | if (currcons >= MIN_NR_CONSOLES) { |
1004 | tty_port_destroy(&vc->port); | ||
1003 | kfree(vc); | 1005 | kfree(vc); |
1006 | } | ||
1004 | vc_cons[currcons].d = NULL; | 1007 | vc_cons[currcons].d = NULL; |
1005 | } | 1008 | } |
1006 | } | 1009 | } |
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index b841f56d2e6..98ff1735eaf 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/console.h> | 25 | #include <linux/console.h> |
26 | #include <linux/consolemap.h> | 26 | #include <linux/consolemap.h> |
27 | #include <linux/signal.h> | 27 | #include <linux/signal.h> |
28 | #include <linux/suspend.h> | ||
28 | #include <linux/timex.h> | 29 | #include <linux/timex.h> |
29 | 30 | ||
30 | #include <asm/io.h> | 31 | #include <asm/io.h> |