diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/n_r3964.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/char/n_r3964.c b/drivers/char/n_r3964.c index 14557a4822c0..6b918b80f73e 100644 --- a/drivers/char/n_r3964.c +++ b/drivers/char/n_r3964.c | |||
@@ -1071,8 +1071,6 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file, | |||
1071 | struct r3964_client_info *pClient; | 1071 | struct r3964_client_info *pClient; |
1072 | struct r3964_message *pMsg; | 1072 | struct r3964_message *pMsg; |
1073 | struct r3964_client_message theMsg; | 1073 | struct r3964_client_message theMsg; |
1074 | DECLARE_WAITQUEUE(wait, current); | ||
1075 | |||
1076 | int count; | 1074 | int count; |
1077 | 1075 | ||
1078 | TRACE_L("read()"); | 1076 | TRACE_L("read()"); |
@@ -1086,16 +1084,8 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file, | |||
1086 | return -EAGAIN; | 1084 | return -EAGAIN; |
1087 | } | 1085 | } |
1088 | /* block until there is a message: */ | 1086 | /* block until there is a message: */ |
1089 | add_wait_queue(&pInfo->read_wait, &wait); | 1087 | wait_event_interruptible(pInfo->read_wait, |
1090 | repeat: | 1088 | (pMsg = remove_msg(pInfo, pClient))); |
1091 | __set_current_state(TASK_INTERRUPTIBLE); | ||
1092 | pMsg = remove_msg(pInfo, pClient); | ||
1093 | if (!pMsg && !signal_pending(current)) { | ||
1094 | schedule(); | ||
1095 | goto repeat; | ||
1096 | } | ||
1097 | __set_current_state(TASK_RUNNING); | ||
1098 | remove_wait_queue(&pInfo->read_wait, &wait); | ||
1099 | } | 1089 | } |
1100 | 1090 | ||
1101 | /* If we still haven't got a message, we must have been signalled */ | 1091 | /* If we still haven't got a message, we must have been signalled */ |