From patchwork Tue Jan 11 23:53:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Miller X-Patchwork-Id: 472801 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 p0BNr8ed009425 for ; Tue, 11 Jan 2011 23:53:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932669Ab1AKXxH (ORCPT ); Tue, 11 Jan 2011 18:53:07 -0500 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:33246 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932474Ab1AKXxG (ORCPT ); Tue, 11 Jan 2011 18:53:06 -0500 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 2401A24C088; Tue, 11 Jan 2011 15:53:39 -0800 (PST) Date: Tue, 11 Jan 2011 15:53:38 -0800 (PST) Message-Id: <20110111.155338.77341413.davem@davemloft.net> To: linux-fbdev@vger.kernel.org CC: sparclinux@vger.kernel.org, alex.buell@munted.org.uk Subject: [PATCH 17/22] arkfb: Don't clobber par->state.vgabase during open method. From: David Miller X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 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.6 (demeter1.kernel.org [140.211.167.41]); Tue, 11 Jan 2011 23:53:08 +0000 (UTC) diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c index f328c9d..7a648a7 100644 --- a/drivers/video/arkfb.c +++ b/drivers/video/arkfb.c @@ -535,7 +535,10 @@ static int arkfb_open(struct fb_info *info, int user) mutex_lock(&(par->open_lock)); if (par->ref_count == 0) { + void __iomem *vgabase = par->state.vgabase; + memset(&(par->state), 0, sizeof(struct vgastate)); + par->state.vgabase = vgabase; par->state.flags = VGA_SAVE_MODE | VGA_SAVE_FONTS | VGA_SAVE_CMAP; par->state.num_crtc = 0x60; par->state.num_seq = 0x30;