Lines Matching refs: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);
973 static struct ffs_ep *ffs_epfile_wait_ep(struct file *file)
975 struct ffs_epfile *epfile = file->private_data;
982 if (file->f_flags & O_NONBLOCK)
994 static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data)
996 struct ffs_epfile *epfile = file->private_data;
1007 ep = ffs_epfile_wait_ep(file);
1017 ret = ffs_mutex_lock(&epfile->mutex, file->f_flags & O_NONBLOCK);
1196 ffs_epfile_open(struct inode *inode, struct file *file)
1203 file->private_data = epfile;
1206 return stream_open(inode, file);
1341 ffs_epfile_release(struct inode *inode, struct file *file)
1469 static int ffs_dmabuf_attach(struct file *file, int fd)
1471 bool nonblock = file->f_flags & O_NONBLOCK;
1472 struct ffs_epfile *epfile = file->private_data;
1540 static int ffs_dmabuf_detach(struct file *file, int fd)
1542 struct ffs_epfile *epfile = file->private_data;
1579 static int ffs_dmabuf_transfer(struct file *file,
1582 bool nonblock = file->f_flags & O_NONBLOCK;
1583 struct ffs_epfile *epfile = file->private_data;
1617 ep = ffs_epfile_wait_ep(file);
1720 static long ffs_epfile_ioctl(struct file *file, unsigned code,
1723 struct ffs_epfile *epfile = file->private_data;
1740 return ffs_dmabuf_attach(file, fd);
1751 return ffs_dmabuf_detach(file, fd);
1762 return ffs_dmabuf_transfer(file, &req);
1769 ep = ffs_epfile_wait_ep(file);
1844 * Mounting the file system creates a controller file, used first for
1877 /* Create "regular" file */
1939 /* EP0 file */
2109 pr_info("file system registered\n");
2111 pr_err("failed registering file system (%d)\n", ret);