diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2005-11-07 04:00:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:53:51 -0500 |
commit | 3084a895c2a963cb9b32271061c832977ff7293c (patch) | |
tree | 03c0650a9d3498f9c2a34b7b2db044ee062de05e | |
parent | 4d9c5b6eb42d9e235003dd4531b44462a77131ea (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>
-rw-r--r-- | drivers/video/console/fbcon.c | 17 |
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, | |||
1886 | mode = fb_find_best_mode(&var, &info->modelist); | 1886 | mode = fb_find_best_mode(&var, &info->modelist); |
1887 | if (mode == NULL) | 1887 | if (mode == NULL) |
1888 | return -EINVAL; | 1888 | return -EINVAL; |
1889 | display_to_var(&var, p); | ||
1889 | fb_videomode_to_var(&var, mode); | 1890 | fb_videomode_to_var(&var, mode); |
1891 | |||
1890 | if (width > var.xres/fw || height > var.yres/fh) | 1892 | if (width > var.xres/fw || height > var.yres/fh) |
1891 | return -EINVAL; | 1893 | return -EINVAL; |
1892 | /* | ||
1893 | * The following can probably have any value... Do we need to | ||
1894 | * set all of them? | ||
1895 | */ | ||
1896 | var.bits_per_pixel = p->bits_per_pixel; | ||
1897 | var.xres_virtual = p->xres_virtual; | ||
1898 | var.yres_virtual = p->yres_virtual; | ||
1899 | var.accel_flags = p->accel_flags; | ||
1900 | var.width = p->width; | ||
1901 | var.height = p->height; | ||
1902 | var.red = p->red; | ||
1903 | var.green = p->green; | ||
1904 | var.blue = p->blue; | ||
1905 | var.transp = p->transp; | ||
1906 | var.nonstd = p->nonstd; | ||
1907 | 1894 | ||
1908 | DPRINTK("resize now %ix%i\n", var.xres, var.yres); | 1895 | DPRINTK("resize now %ix%i\n", var.xres, var.yres); |
1909 | if (CON_IS_VISIBLE(vc)) { | 1896 | if (CON_IS_VISIBLE(vc)) { |