Lines Matching refs:fh
2 * v4l2-fh.c
27 #include <media/v4l2-fh.h>
31 int v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev)
33 fh->vdev = vdev;
34 INIT_LIST_HEAD(&fh->list);
35 set_bit(V4L2_FL_USES_V4L2_FH, &fh->vdev->flags);
38 * fh->events only needs to be initialized if the driver
42 return v4l2_event_init(fh);
44 fh->events = NULL;
50 void v4l2_fh_add(struct v4l2_fh *fh)
54 spin_lock_irqsave(&fh->vdev->fh_lock, flags);
55 list_add(&fh->list, &fh->vdev->fh_list);
56 spin_unlock_irqrestore(&fh->vdev->fh_lock, flags);
60 void v4l2_fh_del(struct v4l2_fh *fh)
64 spin_lock_irqsave(&fh->vdev->fh_lock, flags);
65 list_del_init(&fh->list);
66 spin_unlock_irqrestore(&fh->vdev->fh_lock, flags);
70 void v4l2_fh_exit(struct v4l2_fh *fh)
72 if (fh->vdev == NULL)
75 fh->vdev = NULL;
77 v4l2_event_free(fh);