diff options
-rw-r--r-- | drivers/isdn/divert/divert_procfs.c | 7 | ||||
-rw-r--r-- | drivers/isdn/hysdn/hysdn_proclog.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c index fb4f1bac0133..1c5dc345e7c5 100644 --- a/drivers/isdn/divert/divert_procfs.c +++ b/drivers/isdn/divert/divert_procfs.c | |||
@@ -86,12 +86,13 @@ isdn_divert_read(struct file *file, char __user *buf, size_t count, loff_t *off) | |||
86 | struct divert_info *inf; | 86 | struct divert_info *inf; |
87 | int len; | 87 | int len; |
88 | 88 | ||
89 | if (!*((struct divert_info **) file->private_data)) { | 89 | if (!(inf = *((struct divert_info **) file->private_data))) { |
90 | if (file->f_flags & O_NONBLOCK) | 90 | if (file->f_flags & O_NONBLOCK) |
91 | return -EAGAIN; | 91 | return -EAGAIN; |
92 | interruptible_sleep_on(&(rd_queue)); | 92 | wait_event_interruptible(rd_queue, (inf = |
93 | *((struct divert_info **) file->private_data))); | ||
93 | } | 94 | } |
94 | if (!(inf = *((struct divert_info **) file->private_data))) | 95 | if (!inf) |
95 | return (0); | 96 | return (0); |
96 | 97 | ||
97 | inf->usage_cnt--; /* new usage count */ | 98 | inf->usage_cnt--; /* new usage count */ |
diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c index b61e8d5e84ad..7b5fd8fb1761 100644 --- a/drivers/isdn/hysdn/hysdn_proclog.c +++ b/drivers/isdn/hysdn/hysdn_proclog.c | |||
@@ -175,14 +175,15 @@ hysdn_log_read(struct file *file, char __user *buf, size_t count, loff_t *off) | |||
175 | int len; | 175 | int len; |
176 | hysdn_card *card = PDE_DATA(file_inode(file)); | 176 | hysdn_card *card = PDE_DATA(file_inode(file)); |
177 | 177 | ||
178 | if (!*((struct log_data **) file->private_data)) { | 178 | if (!(inf = *((struct log_data **) file->private_data))) { |
179 | struct procdata *pd = card->proclog; | 179 | struct procdata *pd = card->proclog; |
180 | if (file->f_flags & O_NONBLOCK) | 180 | if (file->f_flags & O_NONBLOCK) |
181 | return (-EAGAIN); | 181 | return (-EAGAIN); |
182 | 182 | ||
183 | interruptible_sleep_on(&(pd->rd_queue)); | 183 | wait_event_interruptible(pd->rd_queue, (inf = |
184 | *((struct log_data **) file->private_data))); | ||
184 | } | 185 | } |
185 | if (!(inf = *((struct log_data **) file->private_data))) | 186 | if (!inf) |
186 | return (0); | 187 | return (0); |
187 | 188 | ||
188 | inf->usage_cnt--; /* new usage count */ | 189 | inf->usage_cnt--; /* new usage count */ |