aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/vga16fb.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-05-25 05:34:52 -0400
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-08-19 04:35:34 -0400
commitc272d64111c4fdc0b6a2122452e98a3315bd6b4b (patch)
treec3e26beda7fd261389f6e1c9d725d7c9bb40f0a3 /drivers/video/vga16fb.c
parent2883cebabbc4efc00408024d284a0230ad3af8a0 (diff)
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>
Diffstat (limited to 'drivers/video/vga16fb.c')
-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,
207 * granularity if someone supports xoffset in bit resolution */ 207 * granularity if someone supports xoffset in bit resolution */
208 vga_io_r(VGA_IS1_RC); /* reset flip-flop */ 208 vga_io_r(VGA_IS1_RC); /* reset flip-flop */
209 vga_io_w(VGA_ATT_IW, VGA_ATC_PEL); 209 vga_io_w(VGA_ATT_IW, VGA_ATC_PEL);
210 if (var->bits_per_pixel == 8) 210 if (info->var.bits_per_pixel == 8)
211 vga_io_w(VGA_ATT_IW, (xoffset & 3) << 1); 211 vga_io_w(VGA_ATT_IW, (xoffset & 3) << 1);
212 else 212 else
213 vga_io_w(VGA_ATT_IW, xoffset & 7); 213 vga_io_w(VGA_ATT_IW, xoffset & 7);