diff mbox

fbdev: Fix fb_find_nearest_mode refresh comparison

Message ID 1292255194.12119.1.camel@kephart (mailing list archive)
State Accepted
Headers show

Commit Message

Andrew Kephart Dec. 13, 2010, 3:46 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c 
index c3a1825..7a61ba6 100644
--- a/drivers/video/modedb.c
+++ b/drivers/video/modedb.c
@@ -902,6 +902,7 @@  const struct fb_videomode
*fb_find_nearest_mode(const struct fb_videomode *mode,
                        abs(cmode->yres - mode->yres);
                if (diff > d) {
                        diff = d;
+                       diff_refresh = abs(cmode->refresh -
mode->refresh);
                        best = cmode;