diff options
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r-- | drivers/char/vt.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index fa1ffbf2c62..e32a076d5f1 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -434,7 +434,7 @@ static void update_attr(struct vc_data *vc) vc->vc_blink, vc->vc_underline, vc->vc_reverse ^ vc->vc_decscnm, vc->vc_italic); vc->vc_video_erase_char = (build_attr(vc, vc->vc_color, 1, vc->vc_blink, 0, vc->vc_decscnm, 0) << 8) | ' '; - vc->vc_scrl_erase_char = (build_attr(vc, vc->vc_def_color, 1, false, false, false, false) << 8) | ' '; + vc->vc_scrl_erase_char = (build_attr(vc, vc->vc_def_color, 1, false, false, vc->vc_decscnm, false) << 8) | ' '; } /* Note: inverting the screen twice should revert to the original state */ @@ -909,7 +909,7 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines) if (vc->vc_tty) { struct winsize ws, *cws = &vc->vc_tty->winsize; - unsigned long flags; + struct pid *pgrp = NULL; memset(&ws, 0, sizeof(ws)); ws.ws_row = vc->vc_rows; @@ -917,11 +917,14 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines) ws.ws_ypixel = vc->vc_scan_lines; mutex_lock(&vc->vc_tty->termios_mutex); - spin_lock_irqsave(&vc->vc_tty->ctrl_lock, flags); - if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col) && - vc->vc_tty->pgrp) + spin_lock_irq(&vc->vc_tty->ctrl_lock); + if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col)) + pgrp = get_pid(vc->vc_tty->pgrp); + spin_unlock_irq(&vc->vc_tty->ctrl_lock); + if (pgrp) { kill_pgrp(vc->vc_tty->pgrp, SIGWINCH, 1); - spin_unlock_irqrestore(&vc->vc_tty->ctrl_lock, flags); + put_pid(pgrp); + } *cws = ws; mutex_unlock(&vc->vc_tty->termios_mutex); } @@ -3422,9 +3425,10 @@ int register_con_driver(const struct consw *csw, int first, int last) if (retval) goto err; - con_driver->dev = device_create(vtconsole_class, NULL, - MKDEV(0, con_driver->node), - "vtcon%i", con_driver->node); + con_driver->dev = device_create_drvdata(vtconsole_class, NULL, + MKDEV(0, con_driver->node), + NULL, "vtcon%i", + con_driver->node); if (IS_ERR(con_driver->dev)) { printk(KERN_WARNING "Unable to create device for %s; " @@ -3532,9 +3536,10 @@ static int __init vtconsole_class_init(void) struct con_driver *con = ®istered_con_driver[i]; if (con->con && !con->dev) { - con->dev = device_create(vtconsole_class, NULL, - MKDEV(0, con->node), - "vtcon%i", con->node); + con->dev = device_create_drvdata(vtconsole_class, NULL, + MKDEV(0, con->node), + NULL, "vtcon%i", + con->node); if (IS_ERR(con->dev)) { printk(KERN_WARNING "Unable to create " |