|
@@ -175,14 +175,15 @@ hysdn_log_read(struct file *file, char __user *buf, size_t count, loff_t *off)
|
|
|
int len;
|
|
|
hysdn_card *card = PDE_DATA(file_inode(file));
|
|
|
|
|
|
- if (!*((struct log_data **) file->private_data)) {
|
|
|
+ if (!(inf = *((struct log_data **) file->private_data))) {
|
|
|
struct procdata *pd = card->proclog;
|
|
|
if (file->f_flags & O_NONBLOCK)
|
|
|
return (-EAGAIN);
|
|
|
|
|
|
- interruptible_sleep_on(&(pd->rd_queue));
|
|
|
+ wait_event_interruptible(pd->rd_queue, (inf =
|
|
|
+ *((struct log_data **) file->private_data)));
|
|
|
}
|
|
|
- if (!(inf = *((struct log_data **) file->private_data)))
|
|
|
+ if (!inf)
|
|
|
return (0);
|
|
|
|
|
|
inf->usage_cnt--; /* new usage count */
|