From patchwork Mon Dec 13 15:46:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Kephart X-Patchwork-Id: 406962 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBDFkbjD022514 for ; Mon, 13 Dec 2010 15:46:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754370Ab0LMPqg (ORCPT ); Mon, 13 Dec 2010 10:46:36 -0500 Received: from outbound.alereon.com ([24.227.220.39]:50063 "EHLO outbound.alereon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754145Ab0LMPqg convert rfc822-to-8bit (ORCPT ); Mon, 13 Dec 2010 10:46:36 -0500 Received: from 192.168.12.43 ([192.168.12.43]) by hermes.alereon.com ([192.168.1.5]) with Microsoft Exchange Server HTTP-DAV ; Mon, 13 Dec 2010 15:46:35 +0000 Received: from kephart by webmail.alereon.com; 13 Dec 2010 09:46:35 -0600 Subject: Re: [PATCH] fbdev: Fix fb_find_nearest_mode refresh comparison From: Andrew Kephart To: linux-fbdev@vger.kernel.org In-Reply-To: <20101211015948.GD3750@linux-sh.org> References: <1292019888.2896.17.camel@kephart> <20101211015948.GD3750@linux-sh.org> Date: Mon, 13 Dec 2010 09:46:34 -0600 Message-ID: <1292255194.12119.1.camel@kephart> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 13 Dec 2010 15:46:37 +0000 (UTC) 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;