diff options
author | Alan Cox <alan@linux.intel.com> | 2012-08-08 11:30:13 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-10 15:55:47 -0400 |
commit | 89c8d91e31f267703e365593f6bfebb9f6d2ad01 (patch) | |
tree | b115c7738762abe4a8a6374debb4991382b2f785 /drivers/tty/n_r3964.c | |
parent | dc6802a771e91050fb686dfeeb9de4c6c9cadb79 (diff) |
tty: localise the lock
The termios and other changes mean the other protections needed on the driver
tty arrays should be adequate. Turn it all back on.
This contains pieces folded in from the fixes made to the original patches
| From: Geert Uytterhoeven <geert@linux-m68k.org> (fix m68k)
| From: Paul Gortmaker <paul.gortmaker@windriver.com> (fix cris)
| From: Jiri Kosina <jkosina@suze.cz> (lockdep)
| From: Eric Dumazet <eric.dumazet@gmail.com> (lockdep)
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_r3964.c')
-rw-r--r-- | drivers/tty/n_r3964.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/tty/n_r3964.c b/drivers/tty/n_r3964.c index 5c6c31459a2f..1e6405070ce6 100644 --- a/drivers/tty/n_r3964.c +++ b/drivers/tty/n_r3964.c | |||
@@ -1065,7 +1065,7 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file, | |||
1065 | 1065 | ||
1066 | TRACE_L("read()"); | 1066 | TRACE_L("read()"); |
1067 | 1067 | ||
1068 | tty_lock(); | 1068 | tty_lock(tty); |
1069 | 1069 | ||
1070 | pClient = findClient(pInfo, task_pid(current)); | 1070 | pClient = findClient(pInfo, task_pid(current)); |
1071 | if (pClient) { | 1071 | if (pClient) { |
@@ -1077,7 +1077,7 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file, | |||
1077 | goto unlock; | 1077 | goto unlock; |
1078 | } | 1078 | } |
1079 | /* block until there is a message: */ | 1079 | /* block until there is a message: */ |
1080 | wait_event_interruptible_tty(pInfo->read_wait, | 1080 | wait_event_interruptible_tty(tty, pInfo->read_wait, |
1081 | (pMsg = remove_msg(pInfo, pClient))); | 1081 | (pMsg = remove_msg(pInfo, pClient))); |
1082 | } | 1082 | } |
1083 | 1083 | ||
@@ -1107,7 +1107,7 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file, | |||
1107 | } | 1107 | } |
1108 | ret = -EPERM; | 1108 | ret = -EPERM; |
1109 | unlock: | 1109 | unlock: |
1110 | tty_unlock(); | 1110 | tty_unlock(tty); |
1111 | return ret; | 1111 | return ret; |
1112 | } | 1112 | } |
1113 | 1113 | ||
@@ -1156,7 +1156,7 @@ static ssize_t r3964_write(struct tty_struct *tty, struct file *file, | |||
1156 | pHeader->locks = 0; | 1156 | pHeader->locks = 0; |
1157 | pHeader->owner = NULL; | 1157 | pHeader->owner = NULL; |
1158 | 1158 | ||
1159 | tty_lock(); | 1159 | tty_lock(tty); |
1160 | 1160 | ||
1161 | pClient = findClient(pInfo, task_pid(current)); | 1161 | pClient = findClient(pInfo, task_pid(current)); |
1162 | if (pClient) { | 1162 | if (pClient) { |
@@ -1175,7 +1175,7 @@ static ssize_t r3964_write(struct tty_struct *tty, struct file *file, | |||
1175 | add_tx_queue(pInfo, pHeader); | 1175 | add_tx_queue(pInfo, pHeader); |
1176 | trigger_transmit(pInfo); | 1176 | trigger_transmit(pInfo); |
1177 | 1177 | ||
1178 | tty_unlock(); | 1178 | tty_unlock(tty); |
1179 | 1179 | ||
1180 | return 0; | 1180 | return 0; |
1181 | } | 1181 | } |