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