Lines Matching defs:file
192 /* file operations */
194 static int fops_open(struct file *file)
196 struct video_device *vdev = video_devdata(file);
197 struct saa7146_dev *dev = video_drvdata(file);
201 DEB_EE("file:%p, dev:%s\n", file, video_device_node_name(vdev));
225 file->private_data = &fh->fh;
231 result = saa7146_vbi_uops.open(dev,file);
233 dev->ext_vv_data->vbi_fops.open(file);
236 result = saa7146_video_uops.open(dev,file);
253 file->private_data = NULL;
259 static int fops_release(struct file *file)
261 struct video_device *vdev = video_devdata(file);
262 struct saa7146_fh *fh = file->private_data;
265 DEB_EE("file:%p\n", file);
271 saa7146_vbi_uops.release(dev,file);
273 dev->ext_vv_data->vbi_fops.release(file);
275 saa7146_video_uops.release(dev,file);
281 file->private_data = NULL;
289 static int fops_mmap(struct file *file, struct vm_area_struct * vma)
291 struct video_device *vdev = video_devdata(file);
292 struct saa7146_fh *fh = file->private_data;
298 DEB_EE("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, vma:%p\n",
299 file, vma);
304 DEB_EE("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, vma:%p\n",
305 file, vma);
322 static __poll_t __fops_poll(struct file *file, struct poll_table_struct *wait)
324 struct video_device *vdev = video_devdata(file);
325 struct saa7146_fh *fh = file->private_data;
328 __poll_t res = v4l2_ctrl_poll(file, wait);
330 DEB_EE("file:%p, poll:%p\n", file, wait);
336 return res | videobuf_poll_stream(file, &fh->vbi_q, wait);
351 poll_wait(file, &buf->done, wait);
361 static __poll_t fops_poll(struct file *file, struct poll_table_struct *wait)
363 struct video_device *vdev = video_devdata(file);
367 res = __fops_poll(file, wait);
372 static ssize_t fops_read(struct file *file, char __user *data, size_t count, loff_t *ppos)
374 struct video_device *vdev = video_devdata(file);
375 struct saa7146_fh *fh = file->private_data;
381 DEB_EE("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, data:%p, count:%lun",
382 file, data, (unsigned long)count);
384 return saa7146_video_uops.read(file,data,count,ppos);
387 DEB_EE("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, data:%p, count:%lu\n",
388 file, data, (unsigned long)count);
393 ret = saa7146_vbi_uops.read(file, data, count, ppos);
403 static ssize_t fops_write(struct file *file, const char __user *data, size_t count, loff_t *ppos)
405 struct video_device *vdev = video_devdata(file);
406 struct saa7146_fh *fh = file->private_data;
416 ret = fh->dev->ext_vv_data->vbi_fops.write(file, data, count, ppos);