From patchwork Tue Dec 21 01:41:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Airlie X-Patchwork-Id: 423171 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 oBL1fraN016735 for ; Tue, 21 Dec 2010 01:42:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933483Ab0LUBmG (ORCPT ); Mon, 20 Dec 2010 20:42:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35655 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933478Ab0LUBmE (ORCPT ); Mon, 20 Dec 2010 20:42:04 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBL1fmXY003160 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 20 Dec 2010 20:41:48 -0500 Received: from clockmaker-el6.bne.redhat.com (dhcp-0-222.bne.redhat.com [10.64.0.222]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oBL1ffm0024946; Mon, 20 Dec 2010 20:41:46 -0500 From: Dave Airlie To: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.sf.net, linux-kernel@vger.kernel.org, Dave Airlie , Alan Cox , Greg KH Subject: [PATCH 2/3] vt: fix issue when fbcon wants to takeover a second time. Date: Tue, 21 Dec 2010 11:41:16 +1000 Message-Id: <1292895677-4242-3-git-send-email-airlied@gmail.com> In-Reply-To: <1292895677-4242-1-git-send-email-airlied@gmail.com> References: <1292895677-4242-1-git-send-email-airlied@gmail.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 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]); Tue, 21 Dec 2010 01:42:23 +0000 (UTC) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index a8ec48e..d781496 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -3524,7 +3524,7 @@ int register_con_driver(const struct consw *csw, int first, int last) /* already registered */ if (con_driver->con == csw) - retval = -EINVAL; + retval = -EBUSY; } if (retval) @@ -3635,7 +3635,12 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt) int err; err = register_con_driver(csw, first, last); - + /* if we get an busy error we still want to bind the console driver + * and return success, as we may have unbound the console driver + * but not unregistered it. + */ + if (err == -EBUSY) + err = 0; if (!err) bind_con_driver(csw, first, last, deflt);