Lines Matching refs:file
23 static int rtc_dev_open(struct inode *inode, struct file *file)
31 file->private_data = rtc;
142 rtc_dev_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
144 struct rtc_device *rtc = file->private_data;
166 if (file->f_flags & O_NONBLOCK) {
191 static __poll_t rtc_dev_poll(struct file *file, poll_table *wait)
193 struct rtc_device *rtc = file->private_data;
196 poll_wait(file, &rtc->irq_queue, wait);
203 static long rtc_dev_ioctl(struct file *file,
207 struct rtc_device *rtc = file->private_data;
407 static long rtc_dev_compat_ioctl(struct file *file,
410 struct rtc_device *rtc = file->private_data;
419 return rtc_dev_ioctl(file, RTC_IRQP_SET, arg);
423 return rtc_dev_ioctl(file, RTC_EPOCH_SET, arg);
426 return rtc_dev_ioctl(file, cmd, (unsigned long)uarg);
430 static int rtc_dev_fasync(int fd, struct file *file, int on)
432 struct rtc_device *rtc = file->private_data;
434 return fasync_helper(fd, file, on, &rtc->async_queue);
437 static int rtc_dev_release(struct inode *inode, struct file *file)
439 struct rtc_device *rtc = file->private_data;
451 rtc_dev_ioctl(file, RTC_UIE_OFF, 0);