From c831c338f0ad299fcd1592c6e4f30657480f39af Mon Sep 17 00:00:00 2001 From: Matthias Kaehlcke Date: Tue, 8 May 2007 00:39:49 -0700 Subject: 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 Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/vt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/char/vt.c') 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 #include #include +#include #include #include #include @@ -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. */ -- cgit v1.1