Lines Matching defs:file

3  * f_fs.c -- user mode file system API for USB composite function controllers
298 /* Control file aka ep0 *****************************************************/
362 static ssize_t ffs_ep0_write(struct file *file, const char __user *buf,
365 struct ffs_data *ffs = file->private_data;
374 ret = ffs_mutex_lock(&ffs->mutex, file->f_flags & O_NONBLOCK);
536 static ssize_t ffs_ep0_read(struct file *file, char __user *buf,
539 struct ffs_data *ffs = file->private_data;
549 ret = ffs_mutex_lock(&ffs->mutex, file->f_flags & O_NONBLOCK);
577 if ((file->f_flags & O_NONBLOCK) && !ffs->ev.count) {
638 static int ffs_ep0_open(struct inode *inode, struct file *file)
645 file->private_data = ffs;
648 return stream_open(inode, file);
651 static int ffs_ep0_release(struct inode *inode, struct file *file)
653 struct ffs_data *ffs = file->private_data;
660 static long ffs_ep0_ioctl(struct file *file, unsigned code, unsigned long value)
662 struct ffs_data *ffs = file->private_data;
678 static __poll_t ffs_ep0_poll(struct file *file, poll_table *wait)
680 struct ffs_data *ffs = file->private_data;
684 poll_wait(file, &ffs->ev.waitq, wait);
686 ret = ffs_mutex_lock(&ffs->mutex, file->f_flags & O_NONBLOCK);
968 static struct ffs_ep *ffs_epfile_wait_ep(struct file *file)
970 struct ffs_epfile *epfile = file->private_data;
977 if (file->f_flags & O_NONBLOCK)
989 static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data)
991 struct ffs_epfile *epfile = file->private_data;
1002 ep = ffs_epfile_wait_ep(file);
1012 ret = ffs_mutex_lock(&epfile->mutex, file->f_flags & O_NONBLOCK);
1191 ffs_epfile_open(struct inode *inode, struct file *file)
1198 file->private_data = epfile;
1201 return stream_open(inode, file);
1336 ffs_epfile_release(struct inode *inode, struct file *file)
1464 static int ffs_dmabuf_attach(struct file *file, int fd)
1466 bool nonblock = file->f_flags & O_NONBLOCK;
1467 struct ffs_epfile *epfile = file->private_data;
1535 static int ffs_dmabuf_detach(struct file *file, int fd)
1537 struct ffs_epfile *epfile = file->private_data;
1574 static int ffs_dmabuf_transfer(struct file *file,
1577 bool nonblock = file->f_flags & O_NONBLOCK;
1578 struct ffs_epfile *epfile = file->private_data;
1612 ep = ffs_epfile_wait_ep(file);
1715 static long ffs_epfile_ioctl(struct file *file, unsigned code,
1718 struct ffs_epfile *epfile = file->private_data;
1735 return ffs_dmabuf_attach(file, fd);
1746 return ffs_dmabuf_detach(file, fd);
1757 return ffs_dmabuf_transfer(file, &req);
1764 ep = ffs_epfile_wait_ep(file);
1839 * Mounting the file system creates a controller file, used first for
1872 /* Create "regular" file */
1934 /* EP0 file */
2104 pr_info("file system registered\n");
2106 pr_err("failed registering file system (%d)\n", ret);