vt8500lcdfb: use display information in info not in var for panning
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 25 May 2011 09:34:52 +0000 (11:34 +0200)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 19 Aug 2011 08:36:12 +0000 (10:36 +0200)
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/video/vt8500lcdfb.c

index 0e120d67eb65074eb0f337ff9d29e10cdae134a3..c13c246be9a56ddd68b398e00f123937517c80fa 100644 (file)
@@ -210,8 +210,8 @@ static int vt8500lcd_pan_display(struct fb_var_screeninfo *var,
        struct vt8500lcd_info *fbi = to_vt8500lcd_info(info);
 
        writel((1 << 31)
-               | (((var->xres_virtual - var->xres) * pixlen / 4) << 20)
-               | (off >> 2), fbi->regbase + 0x20);
+            | (((info->var.xres_virtual - info->var.xres) * pixlen / 4) << 20)
+            | (off >> 2), fbi->regbase + 0x20);
        return 0;
 }
 
This page took 0.029523 seconds and 5 git commands to generate.