summaryrefslogtreecommitdiff
path: root/drivers/video/console/fbcon.c
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2005-11-07 01:00:37 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 07:53:51 -0800
commit3084a895c2a963cb9b32271061c832977ff7293c (patch)
tree03c0650a9d3498f9c2a34b7b2db044ee062de05e /drivers/video/console/fbcon.c
parent4d9c5b6eb42d9e235003dd4531b44462a77131ea (diff)
[PATCH] fbcon: Use helper function when filling out var structure
Instead of manually filling up the fields in struct fb_var_screeninfo, use the display_to_var() helper. Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/console/fbcon.c')
-rw-r--r--drivers/video/console/fbcon.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 188053eafc69..e111a88612f7 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1886,24 +1886,11 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width,
mode = fb_find_best_mode(&var, &info->modelist);
if (mode == NULL)
return -EINVAL;
+ display_to_var(&var, p);
fb_videomode_to_var(&var, mode);
+
if (width > var.xres/fw || height > var.yres/fh)
return -EINVAL;
- /*
- * The following can probably have any value... Do we need to
- * set all of them?
- */
- var.bits_per_pixel = p->bits_per_pixel;
- var.xres_virtual = p->xres_virtual;
- var.yres_virtual = p->yres_virtual;
- var.accel_flags = p->accel_flags;
- var.width = p->width;
- var.height = p->height;
- var.red = p->red;
- var.green = p->green;
- var.blue = p->blue;
- var.transp = p->transp;
- var.nonstd = p->nonstd;
DPRINTK("resize now %ix%i\n", var.xres, var.yres);
if (CON_IS_VISIBLE(vc)) {