Lines Matching full:file
3 V4L2 File handlers
6 struct v4l2_fh provides a way to easily keep file handle specific
15 whether a driver uses :c:type:`v4l2_fh` as its ``file->private_data`` pointer
19 struct v4l2_fh is allocated as a part of the driver's own file handle
20 structure and ``file->private_data`` is set to it in the driver's ``open()``
29 Drivers can extract their own file handle structure by using the container_of
43 int my_open(struct file *file)
59 file->private_data = &my_fh->fh;
64 int my_release(struct file *file)
66 struct v4l2_fh *fh = file->private_data;
82 - Initialise the file handle. This **MUST** be performed in the driver's
89 - Add a :c:type:`v4l2_fh` to :c:type:`video_device` file handle list.
90 Must be called once the file handle is completely initialized.
95 - Unassociate the file handle from :c:type:`video_device`. The file handle
101 - Uninitialise the file handle. After uninitialisation the :c:type:`v4l2_fh`
108 (struct file \*filp)
111 the struct video_device associated with the file struct.
114 (struct file \*filp)
117 file struct, uninitialised the :c:type:`v4l2_fh` and frees it.
122 Several drivers need to do something when the first file handle is opened and
123 when the last file handle closes. Two helper functions were added to check
130 - Returns 1 if the file handle is the only open file handle, else 0.
133 (struct file \*filp)