From: Michal Januszewski Date: Mon, 28 Apr 2008 09:15:15 +0000 (-0700) Subject: uvesafb: don't treat valid modes returned byfb_find_mode() as errors X-Git-Tag: v2.6.26-rc1~813 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=5e72b32d86841e4a4a3045d8e35a39eb53ce7ce2;p=sfrench%2Fcifs-2.6.git uvesafb: don't treat valid modes returned byfb_find_mode() as errors Don't treat valid modes returned by fb_find_mode() (best-fit modes, default modes or the first valid mode) as errors. Currently, when fb_find_mode() finds a valid mode belonging to one of the above-mentioned classes, uvesafb will ignore it and will try to set a 640x480 video mode. The expected behaviour (introduced by this patch) would be to use the valid mode returned by fb_find_mode() instead. Signed-off-by: Michal Januszewski Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index 93361656316c..c4f4d7616317 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c @@ -885,7 +885,7 @@ static int __devinit uvesafb_vbe_init_mode(struct fb_info *info) } /* fb_find_mode() failed */ - if (i == 0 || i >= 3) { + if (i == 0) { info->var.xres = 640; info->var.yres = 480; mode = (struct fb_videomode *)