diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-09-09 22:38:43 +0100 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-09-09 22:38:43 +0100 |
| commit | de9ea203d105f760e8e995c07aa80e855a9aedba (patch) | |
| tree | 75e4702e98a0b3ea9ed6d085f74474a70642909b /drivers/char/vt.c | |
| parent | 2be23c475af8ae4e25f8bab08d815b17593bd547 (diff) | |
| parent | d56557af19867edb8c0e96f8e26399698a08857f (diff) | |
| download | linux-next-de9ea203d105f760e8e995c07aa80e855a9aedba.tar.gz linux-next-de9ea203d105f760e8e995c07aa80e855a9aedba.zip | |
Merge branch 'origin'
Diffstat (limited to 'drivers/char/vt.c')
| -rw-r--r-- | drivers/char/vt.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 50590c7f2c01..281aada7b4a1 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -906,22 +906,16 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc, * bottom of buffer */ old_origin += (old_rows - new_rows) * old_row_size; - end = vc->vc_scr_end; } else { /* * Cursor is in no man's land, copy 1/2 screenful * from the top and bottom of cursor position */ old_origin += (vc->vc_y - new_rows/2) * old_row_size; - end = old_origin + (old_row_size * new_rows); } - } else - /* - * Cursor near the top, copy contents from the top of buffer - */ - end = (old_rows > new_rows) ? old_origin + - (old_row_size * new_rows) : - vc->vc_scr_end; + } + + end = old_origin + old_row_size * min(old_rows, new_rows); update_attr(vc); @@ -3075,8 +3069,7 @@ static int bind_con_driver(const struct consw *csw, int first, int last, old_was_color = vc->vc_can_do_color; vc->vc_sw->con_deinit(vc); - if (!vc->vc_origin) - vc->vc_origin = (unsigned long)vc->vc_screenbuf; + vc->vc_origin = (unsigned long)vc->vc_screenbuf; visual_init(vc, i, 0); set_origin(vc); update_attr(vc); |
