/* Returns zero on success otherwise an error code.  */
static int sep_open(struct inode *inode, struct file *filp)
/* Returns zero on success otherwise an error code.  */
static int sep_open(struct inode *inode, struct file *filp)
{
	if (sep_dev == NULL)
		return -ENODEV;
	if (filp->f_flags & O_NDELAY) {
		if (sep_try_open(sep_dev) == 0)
			return -EAGAIN;
	} else
		if (wait_event_interruptible(sep_event, sep_try_open(sep_dev)) < 0)
			return -EINTR;
	filp->private_data = sep_dev;
	sep_dev->data_pool_bytes_allocated = 0;
	return 0;
}