summaryrefslogtreecommitdiff
path: root/drivers/media/platform/chips-media/wave5/wave5-vpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/chips-media/wave5/wave5-vpu.h')
-rw-r--r--drivers/media/platform/chips-media/wave5/wave5-vpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu.h b/drivers/media/platform/chips-media/wave5/wave5-vpu.h
index 3847332551fc..5943bdaa9c4c 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu.h
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu.h
@@ -46,6 +46,11 @@ static inline struct vpu_instance *wave5_to_vpu_inst(struct v4l2_fh *vfh)
return container_of(vfh, struct vpu_instance, v4l2_fh);
}
+static inline struct vpu_instance *file_to_vpu_inst(struct file *filp)
+{
+ return wave5_to_vpu_inst(file_to_v4l2_fh(filp));
+}
+
static inline struct vpu_instance *wave5_ctrl_to_vpu_inst(struct v4l2_ctrl *vctrl)
{
return container_of(vctrl->handler, struct vpu_instance, v4l2_ctrl_hdl);