From linux-fbdev-devel-admin@lists.sourceforge.net Tue Oct 18 21:43:29 2005
Return-Path: <linux-fbdev-devel-admin@lists.sourceforge.net>
Received: from localhost (localhost [127.0.0.1]) by tim.rpsys.net
	(8.13.1/8.12.10) with ESMTP id j9IKhTWk008954 for <rpurdie@rpsys.net>; Tue,
	18 Oct 2005 21:43:29 +0100
Received: from tim.rpsys.net ([127.0.0.1]) by localhost (tim.rpsys.net
	[127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08910-01 for
	<rpurdie@rpsys.net>; Tue, 18 Oct 2005 21:43:28 +0100 (BST)
Received: from lists-outbound.sourceforge.net
	(lists-outbound.sourceforge.net [66.35.250.225]) by tim.rpsys.net
	(8.13.1/8.12.10) with ESMTP id j9IKhMBd008935 for <rpurdie@rpsys.net>; Tue,
	18 Oct 2005 21:43:22 +0100
Received: from projects.sourceforge.net (sc8-sf-list1-b.sourceforge.net
	[10.3.1.7]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id
	97F32E78A; Tue, 18 Oct 2005 13:43:14 -0700 (PDT)
Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92]
	helo=mail.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim
	4.30) id 1ERyHy-0000aD-PB for linux-fbdev-devel@lists.sourceforge.net; Tue,
	18 Oct 2005 13:42:26 -0700
Received: from zproxy.gmail.com ([64.233.162.204]) by mail.sourceforge.net
	with esmtp (Exim 4.44) id 1ERyHx-0000dG-HO for
	linux-fbdev-devel@lists.sourceforge.net; Tue, 18 Oct 2005 13:42:26 -0700
Received: by zproxy.gmail.com with SMTP id 14so1395707nzn for
	<linux-fbdev-devel@lists.sourceforge.net>; Tue, 18 Oct 2005 13:42:25 -0700
	(PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
	h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:cc:subject:content-type:content-transfer-encoding;
	b=t7vhXsladxnxxrRaau8g2jXRrdIMywojOSvYWTRsGd/lCRMHh5vZWccTpqPLfWsiFhKNvywwam0I/qn7B0e7UHw/vTas8xZoMDRlD9E7QD4mSh0aVsXbybazHltfuEsX03eDpKb+yXm1+0U2ulHd25n7LBPDWdzIXAOmmQwBC4w=
Received: by 10.37.21.80 with SMTP id y80mr1354101nzi; Tue, 18 Oct 2005
	13:42:25 -0700 (PDT)
Received: from ?192.168.232.14? ( [203.84.188.34]) by mx.gmail.com with
	ESMTP id 39sm622753nzk.2005.10.18.13.42.21; Tue, 18 Oct 2005 13:42:24 -0700
	(PDT)
Message-ID: <4354BD09.2040401@gmail.com>
From: "Antonino A. Daplas" <adaplas@gmail.com>
User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050715)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Fbdev development list <linux-fbdev-devel@lists.sourceforge.net>
Content-Type: text/plain; charset=ISO-8859-1
Subject: [Linux-fbdev-devel] [PATCH 3/17] fbcon: Use helper function when
	filling out var structure
Sender: linux-fbdev-devel-admin@lists.sourceforge.net
Errors-To: linux-fbdev-devel-admin@lists.sourceforge.net
X-BeenThere: linux-fbdev-devel@lists.sourceforge.net
X-Mailman-Version: 2.0.9-sf.net
Precedence: bulk
Reply-To: linux-fbdev-devel@lists.sourceforge.net
List-Unsubscribe:
	<https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel>,
	<mailto:linux-fbdev-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Id: <linux-fbdev-devel.lists.sourceforge.net>
List-Post: <mailto:linux-fbdev-devel@lists.sourceforge.net>
List-Help:
	<mailto:linux-fbdev-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe:
	<https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel>,
	<mailto:linux-fbdev-devel-request@lists.sourceforge.net?subject=subscribe>
List-Archive:
	<http://sourceforge.net/mailarchive/forum.php?forum=linux-fbdev-devel>
X-Original-Date: Tue, 18 Oct 2005 17:14:49 +0800
Date: Tue, 18 Oct 2005 17:14:49 +0800
X-Virus-Scanned: amavisd-new at rpsys.net
X-Evolution-Source: imap://richard@tim.rpsys.net/
Content-Transfer-Encoding: 8bit

Instead of manually filling up the fields in struct fb_var_screeninfo, use
the display_to_var() helper.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
---
 fbcon.c |   17 ++---------------
 1 files changed, 2 insertions(+), 15 deletions(-)


diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1886,24 +1886,11 @@ static int fbcon_resize(struct vc_data *
 		mode = fb_find_best_mode(&var, &info->modelist);
 		if (mode == NULL)
 			return -EINVAL;
+		display_to_var(&var, p);
 		fb_videomode_to_var(&var, mode);
+
 		if (width > var.xres/fw || height > var.yres/fh)
 			return -EINVAL;
-		/*
-		 * The following can probably have any value... Do we need to
-		 * set all of them?
-		 */
-		var.bits_per_pixel = p->bits_per_pixel;
-		var.xres_virtual = p->xres_virtual;
-		var.yres_virtual = p->yres_virtual;
-		var.accel_flags = p->accel_flags;
-		var.width = p->width;
-		var.height = p->height;
-		var.red = p->red;
-		var.green = p->green;
-		var.blue = p->blue;
-		var.transp = p->transp;
-		var.nonstd = p->nonstd;
 
 		DPRINTK("resize now %ix%i\n", var.xres, var.yres);
 		if (CON_IS_VISIBLE(vc)) {




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel


