summaryrefslogtreecommitdiffstats
path: root/drivers/video/vga16fb.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-06-14 11:25:04 +0200
committerPaul Mundt <lethal@linux-sh.org>2011-06-15 08:03:54 +0200
commit4d3c68a1b468741fcebfbfb0b92ff9e75a063484 (patch)
tree6fba369213763452e4bc8afe1eb3bef714507a68 /drivers/video/vga16fb.c
parenttridentfb: use display information in info not in var for panning (diff)
downloadlinux-4d3c68a1b468741fcebfbfb0b92ff9e75a063484.tar.xz
linux-4d3c68a1b468741fcebfbfb0b92ff9e75a063484.zip
vga16fb: 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 <laurent.pinchart@ideasonboard.com> Cc: Antonino A. Daplas <adaplas@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to '')
-rw-r--r--drivers/video/vga16fb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
index 305c975b1787..0267acd8dc83 100644
--- a/drivers/video/vga16fb.c
+++ b/drivers/video/vga16fb.c
@@ -207,7 +207,7 @@ static void vga16fb_pan_var(struct fb_info *info,
* granularity if someone supports xoffset in bit resolution */
vga_io_r(VGA_IS1_RC); /* reset flip-flop */
vga_io_w(VGA_ATT_IW, VGA_ATC_PEL);
- if (var->bits_per_pixel == 8)
+ if (info->var.bits_per_pixel == 8)
vga_io_w(VGA_ATT_IW, (xoffset & 3) << 1);
else
vga_io_w(VGA_ATT_IW, xoffset & 7);