summaryrefslogtreecommitdiff
path: root/drivers/tty/vt/vt.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-02-01 08:05:19 +1000
committerLinus Torvalds <torvalds@linux-foundation.org>2011-02-01 08:05:19 +1000
commitabfa44b5fd4a2f5d7549005bec465d4823a263ff (patch)
tree98376516ae6a314569b589df1f6ac6d49831bde5 /drivers/tty/vt/vt.c
parent70d1f365568e0cdbc9f4ab92428e1830fdb09ab0 (diff)
parentfed7bb324cffd980a4a576514ced3ff52f68f319 (diff)
Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: tty/serial: fix apbuart build n_hdlc: fix read and write locking serial: unbreak billionton CF card tty: use for_each_console() and WARN() on sysfs failures vt: fix issue when fbcon wants to takeover a second time. Fix up trivial conflict in drivers/tty/tty_io.c
Diffstat (limited to 'drivers/tty/vt/vt.c')
-rw-r--r--drivers/tty/vt/vt.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index b230bd3f056f..147ede3423df 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -2994,7 +2994,7 @@ int __init vty_init(const struct file_operations *console_fops)
if (IS_ERR(tty0dev))
tty0dev = NULL;
else
- device_create_file(tty0dev, &dev_attr_active);
+ WARN_ON(device_create_file(tty0dev, &dev_attr_active) < 0);
vcs_init();
@@ -3545,7 +3545,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)
@@ -3656,7 +3656,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);