[PATCH] uvesafb: don't treat valid modes returned byfb_find_mode() as errors

From: Michal Januszewski
Date: Sun Mar 16 2008 - 07:24:11 EST


From: Michal Januszewski <spock@xxxxxxxxxx>

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 <spock@xxxxxxxxxx>
---
As requested, this patch contains an expanded changelog message. The
bug is by no means critical and should have no impact on the large
majority of users, so it's definitely not 2.6.24 material.

diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index a14ef89..fc68b3e 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 *)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/