diff options
author | Matthias Kaehlcke <matthias.kaehlcke@gmail.com> | 2007-05-08 00:39:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 11:15:33 -0700 |
commit | c831c338f0ad299fcd1592c6e4f30657480f39af (patch) | |
tree | e2562fbcffe80e9d78255a92aab7f7db1f761e9d /drivers/char/vt.c | |
parent | 159dde93692ef549a0b2012c9f25feb4df638c9c (diff) | |
download | op-kernel-dev-c831c338f0ad299fcd1592c6e4f30657480f39af.zip op-kernel-dev-c831c338f0ad299fcd1592c6e4f30657480f39af.tar.gz |
use mutex instead of semaphore in virtual console driver
The virtual console driver uses a semaphore as mutex. Use the mutex API
instead of the (binary) semaphore.
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r-- | drivers/char/vt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 0edbbc3..bbd9fc4 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -86,6 +86,7 @@ #include <linux/mm.h> #include <linux/console.h> #include <linux/init.h> +#include <linux/mutex.h> #include <linux/vt_kern.h> #include <linux/selection.h> #include <linux/tiocl.h> @@ -1952,7 +1953,7 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) * kernel memory allocation is available. */ char con_buf[CON_BUF_SIZE]; -DECLARE_MUTEX(con_buf_sem); +DEFINE_MUTEX(con_buf_mtx); /* is_double_width() is based on the wcwidth() implementation by * Markus Kuhn -- 2003-05-20 (Unicode 4.0) @@ -2049,7 +2050,7 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co /* At this point 'buf' is guaranteed to be a kernel buffer * and therefore no access to userspace (and therefore sleeping) - * will be needed. The con_buf_sem serializes all tty based + * will be needed. The con_buf_mtx serializes all tty based * console rendering and vcs write/read operations. We hold * the console spinlock during the entire write. */ |