fbdev: Fix fb_find_nearest_mode refresh comparison
authorAndrew Kephart <andrew.kephart@alereon.com>
Mon, 13 Dec 2010 15:46:34 +0000 (09:46 -0600)
committerMatt Sealey <matt@genesi-usa.com>
Wed, 20 Apr 2011 15:03:08 +0000 (10:03 -0500)
commit6f4f7206df8e03eb72707f76e24cabdaea51592a
tree90ab09ebc85d130425fecb135d83e9642c730525
parent2722d9a434d4689e7f2bd27772412e19ecb924b5
fbdev: Fix fb_find_nearest_mode refresh comparison

Refresh rate nearness is not calculated or reset when nearest resolution
changes.

This patch resets the refresh rate differential measurement whenever a
new nearest resolution is discovered.  This fixes two error cases;
first, wherein the first mode's refresh rate differential is never
calculated and second, when the closest refresh rate from a previous
nearest resolution is erroneously preserved.

Signed-off-by: Andrew Kephart <andrew.kephart@alereon.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/video/modedb.c