summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbcon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbcon.c')
-rw-r--r--drivers/video/fbcon.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/video/fbcon.c b/drivers/video/fbcon.c
index c559afcca..32935dfc3 100644
--- a/drivers/video/fbcon.c
+++ b/drivers/video/fbcon.c
@@ -1907,12 +1907,13 @@ static unsigned long fbcon_getxy(struct vc_data *conp, unsigned long pos, int *p
y += softback_lines;
ret = pos + (conp->vc_cols - x) * 2;
} else if (conp->vc_num == fg_console && softback_lines) {
- unsigned long offset = (pos - softback_curr) / 2;
+ unsigned long offset = pos - softback_curr;
+ if (pos < softback_curr)
+ offset += softback_end - softback_buf;
+ offset /= 2;
x = offset % conp->vc_cols;
y = offset / conp->vc_cols;
- if (pos < softback_curr)
- y += (softback_end - softback_buf) / conp->vc_size_row;
ret = pos + (conp->vc_cols - x) * 2;
if (ret == softback_end)
ret = softback_buf;
@@ -2384,7 +2385,7 @@ static int __init fbcon_show_logo( void )
* The console `switch' structure for the frame buffer based console
*/
-struct consw fb_con = {
+const struct consw fb_con = {
con_startup: fbcon_startup,
con_init: fbcon_init,
con_deinit: fbcon_deinit,