diff options
Diffstat (limited to 'drivers/tty/n_r3964.c')
-rw-r--r-- | drivers/tty/n_r3964.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/tty/n_r3964.c b/drivers/tty/n_r3964.c index 5c6c31459a2f..656ad93bbc96 100644 --- a/drivers/tty/n_r3964.c +++ b/drivers/tty/n_r3964.c | |||
@@ -1065,7 +1065,8 @@ 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 | /* FIXME: should use a private lock */ |
1069 | tty_lock(tty); | ||
1069 | 1070 | ||
1070 | pClient = findClient(pInfo, task_pid(current)); | 1071 | pClient = findClient(pInfo, task_pid(current)); |
1071 | if (pClient) { | 1072 | if (pClient) { |
@@ -1077,7 +1078,7 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file, | |||
1077 | goto unlock; | 1078 | goto unlock; |
1078 | } | 1079 | } |
1079 | /* block until there is a message: */ | 1080 | /* block until there is a message: */ |
1080 | wait_event_interruptible_tty(pInfo->read_wait, | 1081 | wait_event_interruptible_tty(tty, pInfo->read_wait, |
1081 | (pMsg = remove_msg(pInfo, pClient))); | 1082 | (pMsg = remove_msg(pInfo, pClient))); |
1082 | } | 1083 | } |
1083 | 1084 | ||
@@ -1107,7 +1108,7 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file, | |||
1107 | } | 1108 | } |
1108 | ret = -EPERM; | 1109 | ret = -EPERM; |
1109 | unlock: | 1110 | unlock: |
1110 | tty_unlock(); | 1111 | tty_unlock(tty); |
1111 | return ret; | 1112 | return ret; |
1112 | } | 1113 | } |
1113 | 1114 | ||
@@ -1156,7 +1157,7 @@ static ssize_t r3964_write(struct tty_struct *tty, struct file *file, | |||
1156 | pHeader->locks = 0; | 1157 | pHeader->locks = 0; |
1157 | pHeader->owner = NULL; | 1158 | pHeader->owner = NULL; |
1158 | 1159 | ||
1159 | tty_lock(); | 1160 | tty_lock(tty); |
1160 | 1161 | ||
1161 | pClient = findClient(pInfo, task_pid(current)); | 1162 | pClient = findClient(pInfo, task_pid(current)); |
1162 | if (pClient) { | 1163 | if (pClient) { |
@@ -1175,7 +1176,7 @@ static ssize_t r3964_write(struct tty_struct *tty, struct file *file, | |||
1175 | add_tx_queue(pInfo, pHeader); | 1176 | add_tx_queue(pInfo, pHeader); |
1176 | trigger_transmit(pInfo); | 1177 | trigger_transmit(pInfo); |
1177 | 1178 | ||
1178 | tty_unlock(); | 1179 | tty_unlock(tty); |
1179 | 1180 | ||
1180 | return 0; | 1181 | return 0; |
1181 | } | 1182 | } |