From 906cbe1364d94da7cbf74c1d05e3e78b2883f661 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 14 Jul 2011 14:35:14 +0200 Subject: TTY: remove tty_locked We used it really only serial and ami_serial. The rest of the callsites were BUG/WARN_ONs to check if BTM is held. Now that we pruned tty_locked from both of the real users, we can get rid of tty_lock along with __big_tty_mutex_owner. Signed-off-by: Jiri Slaby Acked-by: Arnd Bergmann Cc: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/tty/tty_mutex.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'drivers/tty/tty_mutex.c') diff --git a/drivers/tty/tty_mutex.c b/drivers/tty/tty_mutex.c index 3b2bb7719442..9ff986c32a21 100644 --- a/drivers/tty/tty_mutex.c +++ b/drivers/tty/tty_mutex.c @@ -15,30 +15,18 @@ * Don't use in new code. */ static DEFINE_MUTEX(big_tty_mutex); -struct task_struct *__big_tty_mutex_owner; -EXPORT_SYMBOL_GPL(__big_tty_mutex_owner); /* * Getting the big tty mutex. */ void __lockfunc tty_lock(void) { - struct task_struct *task = current; - - WARN_ON(__big_tty_mutex_owner == task); - mutex_lock(&big_tty_mutex); - __big_tty_mutex_owner = task; } EXPORT_SYMBOL(tty_lock); void __lockfunc tty_unlock(void) { - struct task_struct *task = current; - - WARN_ON(__big_tty_mutex_owner != task); - __big_tty_mutex_owner = NULL; - mutex_unlock(&big_tty_mutex); } EXPORT_SYMBOL(tty_unlock); -- cgit v1.2.3