Lines Matching defs:file

13 #include <linux/file.h>
197 static long linehandle_ioctl(struct file *file, unsigned int cmd,
200 struct linehandle_state *lh = file->private_data;
259 static long linehandle_ioctl_compat(struct file *file, unsigned int cmd,
262 return linehandle_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
278 static int linehandle_release(struct inode *inode, struct file *file)
280 linehandle_free(file->private_data);
298 struct file *file;
379 file = anon_inode_getfile("gpio-linehandle",
383 if (IS_ERR(file)) {
384 ret = PTR_ERR(file);
394 fput(file);
399 fd_install(fd, file);
1563 static long linereq_ioctl(struct file *file, unsigned int cmd,
1566 struct linereq *lr = file->private_data;
1587 static long linereq_ioctl_compat(struct file *file, unsigned int cmd,
1590 return linereq_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
1594 static __poll_t linereq_poll(struct file *file,
1597 struct linereq *lr = file->private_data;
1605 poll_wait(file, &lr->wait, wait);
1614 static ssize_t linereq_read(struct file *file, char __user *buf,
1617 struct linereq *lr = file->private_data;
1636 if (file->f_flags & O_NONBLOCK)
1690 static int linereq_release(struct inode *inode, struct file *file)
1692 struct linereq *lr = file->private_data;
1699 static void linereq_show_fdinfo(struct seq_file *out, struct file *file)
1701 struct linereq *lr = file->private_data;
1733 struct file *file;
1849 file = anon_inode_getfile("gpio-line", &line_fileops, lr,
1851 if (IS_ERR(file)) {
1852 ret = PTR_ERR(file);
1862 fput(file);
1867 fd_install(fd, file);
1917 static __poll_t lineevent_poll(struct file *file,
1920 struct lineevent_state *le = file->private_data;
1928 poll_wait(file, &le->wait, wait);
1952 static ssize_t lineevent_read(struct file *file, char __user *buf,
1955 struct lineevent_state *le = file->private_data;
1988 if (file->f_flags & O_NONBLOCK)
2031 static int lineevent_release(struct inode *inode, struct file *file)
2033 lineevent_free(file->private_data);
2037 static long lineevent_ioctl(struct file *file, unsigned int cmd,
2040 struct lineevent_state *le = file->private_data;
2072 static long lineevent_ioctl_compat(struct file *file, unsigned int cmd,
2075 return lineevent_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
2157 struct file *file;
2275 file = anon_inode_getfile("gpio-event",
2279 if (IS_ERR(file)) {
2280 ret = PTR_ERR(file);
2290 fput(file);
2295 fd_install(fd, file);
2560 static long gpio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
2562 struct gpio_chardev_data *cdev = file->private_data;
2600 static long gpio_ioctl_compat(struct file *file, unsigned int cmd,
2603 return gpio_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
2646 static __poll_t lineinfo_watch_poll(struct file *file,
2649 struct gpio_chardev_data *cdev = file->private_data;
2657 poll_wait(file, &cdev->wait, pollt);
2666 static ssize_t lineinfo_watch_read(struct file *file, char __user *buf,
2669 struct gpio_chardev_data *cdev = file->private_data;
2692 if (file->f_flags & O_NONBLOCK)
2742 * @file: file struct for storing private data
2745 static int gpio_chrdev_open(struct inode *inode, struct file *file)
2783 file->private_data = cdev;
2785 ret = nonseekable_open(inode, file);
2808 * @file: file struct for storing private data
2811 static int gpio_chrdev_release(struct inode *inode, struct file *file)
2813 struct gpio_chardev_data *cdev = file->private_data;