if (hal2) {
file->private_data = hal2;
- return nonseekable_open(inode, file);
+ return 0;
}
return -ENODEV;
}
if (!count)
return 0;
+ if (ppos != &file->f_pos)
+ return -ESPIPE;
if (down_interruptible(&adc->sem))
return -EINTR;
if (file->f_flags & O_NONBLOCK) {
if (!count)
return 0;
+ if (ppos != &file->f_pos)
+ return -ESPIPE;
if (down_interruptible(&dac->sem))
return -EINTR;
if (file->f_flags & O_NONBLOCK) {
dac->usecount++;
}
- return nonseekable_open(inode, file);
+ return 0;
}
static int hal2_release(struct inode *inode, struct file *file)