diff options
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 0edbbc3fa9d8..bbd9fc412877 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -86,6 +86,7 @@ | |||
86 | #include <linux/mm.h> | 86 | #include <linux/mm.h> |
87 | #include <linux/console.h> | 87 | #include <linux/console.h> |
88 | #include <linux/init.h> | 88 | #include <linux/init.h> |
89 | #include <linux/mutex.h> | ||
89 | #include <linux/vt_kern.h> | 90 | #include <linux/vt_kern.h> |
90 | #include <linux/selection.h> | 91 | #include <linux/selection.h> |
91 | #include <linux/tiocl.h> | 92 | #include <linux/tiocl.h> |
@@ -1952,7 +1953,7 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) | |||
1952 | * kernel memory allocation is available. | 1953 | * kernel memory allocation is available. |
1953 | */ | 1954 | */ |
1954 | char con_buf[CON_BUF_SIZE]; | 1955 | char con_buf[CON_BUF_SIZE]; |
1955 | DECLARE_MUTEX(con_buf_sem); | 1956 | DEFINE_MUTEX(con_buf_mtx); |
1956 | 1957 | ||
1957 | /* is_double_width() is based on the wcwidth() implementation by | 1958 | /* is_double_width() is based on the wcwidth() implementation by |
1958 | * Markus Kuhn -- 2003-05-20 (Unicode 4.0) | 1959 | * 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 | |||
2049 | 2050 | ||
2050 | /* At this point 'buf' is guaranteed to be a kernel buffer | 2051 | /* At this point 'buf' is guaranteed to be a kernel buffer |
2051 | * and therefore no access to userspace (and therefore sleeping) | 2052 | * and therefore no access to userspace (and therefore sleeping) |
2052 | * will be needed. The con_buf_sem serializes all tty based | 2053 | * will be needed. The con_buf_mtx serializes all tty based |
2053 | * console rendering and vcs write/read operations. We hold | 2054 | * console rendering and vcs write/read operations. We hold |
2054 | * the console spinlock during the entire write. | 2055 | * the console spinlock during the entire write. |
2055 | */ | 2056 | */ |