aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/n_r3964.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-06-01 16:53:01 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-10 16:47:43 -0400
commitec79d6056de58511d8e46d9ae59d3878f958dc3e (patch)
tree8e73cf399c4cb3c31dbf3caced385cfc018a706a /drivers/char/n_r3964.c
parent3f582b8c11014e4ce310d9839fb335164195333f (diff)
tty: replace BKL with a new tty_lock
As a preparation for replacing the big kernel lock in the TTY layer, wrap all the callers in new macros tty_lock, tty_lock_nested and tty_unlock. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/n_r3964.c')
-rw-r--r--drivers/char/n_r3964.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/n_r3964.c b/drivers/char/n_r3964.c
index c1d8b54c816d..f4bd2591e39f 100644
--- a/drivers/char/n_r3964.c
+++ b/drivers/char/n_r3964.c
@@ -1067,7 +1067,7 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
1067 1067
1068 TRACE_L("read()"); 1068 TRACE_L("read()");
1069 1069
1070 lock_kernel(); 1070 tty_lock();
1071 1071
1072 pClient = findClient(pInfo, task_pid(current)); 1072 pClient = findClient(pInfo, task_pid(current));
1073 if (pClient) { 1073 if (pClient) {
@@ -1109,7 +1109,7 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
1109 } 1109 }
1110 ret = -EPERM; 1110 ret = -EPERM;
1111unlock: 1111unlock:
1112 unlock_kernel(); 1112 tty_unlock();
1113 return ret; 1113 return ret;
1114} 1114}
1115 1115
@@ -1158,7 +1158,7 @@ static ssize_t r3964_write(struct tty_struct *tty, struct file *file,
1158 pHeader->locks = 0; 1158 pHeader->locks = 0;
1159 pHeader->owner = NULL; 1159 pHeader->owner = NULL;
1160 1160
1161 lock_kernel(); 1161 tty_lock();
1162 1162
1163 pClient = findClient(pInfo, task_pid(current)); 1163 pClient = findClient(pInfo, task_pid(current));
1164 if (pClient) { 1164 if (pClient) {
@@ -1177,7 +1177,7 @@ static ssize_t r3964_write(struct tty_struct *tty, struct file *file,
1177 add_tx_queue(pInfo, pHeader); 1177 add_tx_queue(pInfo, pHeader);
1178 trigger_transmit(pInfo); 1178 trigger_transmit(pInfo);
1179 1179
1180 unlock_kernel(); 1180 tty_unlock();
1181 1181
1182 return 0; 1182 return 0;
1183} 1183}