Lines Matching refs:filp

1239 static int xillyusb_open(struct inode *inode, struct file *filp)
1260 filp->private_data = chan;
1269 if (((filp->f_mode & FMODE_READ) && !chan->readable) ||
1270 ((filp->f_mode & FMODE_WRITE) && !chan->writable))
1273 if ((filp->f_flags & O_NONBLOCK) && (filp->f_mode & FMODE_READ) &&
1280 if ((filp->f_flags & O_NONBLOCK) && (filp->f_mode & FMODE_WRITE) &&
1289 if (((filp->f_mode & FMODE_READ) && chan->open_for_read) ||
1290 ((filp->f_mode & FMODE_WRITE) && chan->open_for_write))
1293 if (filp->f_mode & FMODE_READ)
1296 if (filp->f_mode & FMODE_WRITE)
1301 if (filp->f_mode & FMODE_WRITE) {
1341 if (filp->f_mode & FMODE_READ) {
1391 if (filp->f_flags & O_NONBLOCK)
1416 if (filp->f_mode & FMODE_READ)
1419 if (filp->f_mode & FMODE_WRITE)
1434 static ssize_t xillyusb_read(struct file *filp, char __user *userbuf,
1437 struct xillyusb_channel *chan = filp->private_data;
1551 if (filp->f_flags & O_NONBLOCK) {
1597 if (((filp->f_flags & O_NONBLOCK) || chan->poll_used) &&
1609 static int xillyusb_flush(struct file *filp, fl_owner_t id)
1611 struct xillyusb_channel *chan = filp->private_data;
1614 if (!(filp->f_mode & FMODE_WRITE))
1645 static ssize_t xillyusb_write(struct file *filp, const char __user *userbuf,
1648 struct xillyusb_channel *chan = filp->private_data;
1673 if (filp->f_flags & O_NONBLOCK) {
1709 static int xillyusb_release(struct inode *inode, struct file *filp)
1711 struct xillyusb_channel *chan = filp->private_data;
1715 if (filp->f_mode & FMODE_READ) {
1746 if (filp->f_mode & FMODE_WRITE) {
1785 static loff_t xillyusb_llseek(struct file *filp, loff_t offset, int whence)
1787 struct xillyusb_channel *chan = filp->private_data;
1789 loff_t pos = filp->f_pos;
1844 filp->f_pos = pos;
1849 static __poll_t xillyusb_poll(struct file *filp, poll_table *wait)
1851 struct xillyusb_channel *chan = filp->private_data;
1855 poll_wait(filp, &chan->in_fifo->waitq, wait);
1858 poll_wait(filp, &chan->out_ep->fifo.waitq, wait);