From: Laurent Pinchart Date: Wed, 25 May 2011 09:34:52 +0000 (+0200) Subject: vt8500lcdfb: use display information in info not in var for panning X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8f0246d6287fbb37c05b7983ff61c7f57ad86a92;p=mv-sheeva.git vt8500lcdfb: use display information in info not in var for panning 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 --- diff --git a/drivers/video/vt8500lcdfb.c b/drivers/video/vt8500lcdfb.c index 0e120d67eb6..c13c246be9a 100644 --- a/drivers/video/vt8500lcdfb.c +++ b/drivers/video/vt8500lcdfb.c @@ -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; }