Commit 1fe2740f authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB (9957): v4l2-subdev: add g_sliced_vbi_cap and add NULL pointer checks

Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 531c98e7
...@@ -40,13 +40,13 @@ int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg) ...@@ -40,13 +40,13 @@ int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg)
case VIDIOC_G_CHIP_IDENT: case VIDIOC_G_CHIP_IDENT:
return v4l2_subdev_call(sd, core, g_chip_ident, arg); return v4l2_subdev_call(sd, core, g_chip_ident, arg);
case VIDIOC_INT_S_STANDBY: case VIDIOC_INT_S_STANDBY:
return v4l2_subdev_call(sd, core, s_standby, *(u32 *)arg); return v4l2_subdev_call(sd, core, s_standby, arg ? (*(u32 *)arg) : 0);
case VIDIOC_INT_RESET: case VIDIOC_INT_RESET:
return v4l2_subdev_call(sd, core, reset, *(u32 *)arg); return v4l2_subdev_call(sd, core, reset, arg ? (*(u32 *)arg) : 0);
case VIDIOC_INT_S_GPIO: case VIDIOC_INT_S_GPIO:
return v4l2_subdev_call(sd, core, s_gpio, *(u32 *)arg); return v4l2_subdev_call(sd, core, s_gpio, arg ? (*(u32 *)arg) : 0);
case VIDIOC_INT_INIT: case VIDIOC_INT_INIT:
return v4l2_subdev_call(sd, core, init, *(u32 *)arg); return v4l2_subdev_call(sd, core, init, arg ? (*(u32 *)arg) : 0);
#ifdef CONFIG_VIDEO_ADV_DEBUG #ifdef CONFIG_VIDEO_ADV_DEBUG
case VIDIOC_DBG_G_REGISTER: case VIDIOC_DBG_G_REGISTER:
return v4l2_subdev_call(sd, core, g_register, arg); return v4l2_subdev_call(sd, core, g_register, arg);
...@@ -90,6 +90,8 @@ int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg) ...@@ -90,6 +90,8 @@ int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg)
return v4l2_subdev_call(sd, video, s_vbi_data, arg); return v4l2_subdev_call(sd, video, s_vbi_data, arg);
case VIDIOC_INT_G_VBI_DATA: case VIDIOC_INT_G_VBI_DATA:
return v4l2_subdev_call(sd, video, g_vbi_data, arg); return v4l2_subdev_call(sd, video, g_vbi_data, arg);
case VIDIOC_G_SLICED_VBI_CAP:
return v4l2_subdev_call(sd, video, g_sliced_vbi_cap, arg);
case VIDIOC_S_FMT: case VIDIOC_S_FMT:
return v4l2_subdev_call(sd, video, s_fmt, arg); return v4l2_subdev_call(sd, video, s_fmt, arg);
case VIDIOC_G_FMT: case VIDIOC_G_FMT:
......
...@@ -110,6 +110,7 @@ struct v4l2_subdev_video_ops { ...@@ -110,6 +110,7 @@ struct v4l2_subdev_video_ops {
int (*decode_vbi_line)(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi_line); int (*decode_vbi_line)(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi_line);
int (*s_vbi_data)(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *vbi_data); int (*s_vbi_data)(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *vbi_data);
int (*g_vbi_data)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *vbi_data); int (*g_vbi_data)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *vbi_data);
int (*g_sliced_vbi_cap)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_cap *cap);
int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std); int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std);
int (*s_stream)(struct v4l2_subdev *sd, int enable); int (*s_stream)(struct v4l2_subdev *sd, int enable);
int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt); int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment