提交 80c6e358 编写于 作者: M Mauro Carvalho Chehab

V4L/DVB (11109): au0828: Fix compilation when VIDEO_ADV_DEBUG = n

As reported by Kyle McMartin and Randy Dunlap:

drivers/media/video/au0828/au0828-video.c:1438: error: 'const struct v4l2_subdev_core_ops' has no member named 'g_register'
drivers/media/video/au0828/au0828-video.c:1453: error: 'const struct v4l2_subdev_core_ops' has no member named 's_register'

This patch properly implements those two API ioctls only when debug is
enabled.

Cc: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 06e9509f
...@@ -1427,6 +1427,7 @@ static int vidioc_streamoff(struct file *file, void *priv, ...@@ -1427,6 +1427,7 @@ static int vidioc_streamoff(struct file *file, void *priv,
return 0; return 0;
} }
#ifdef CONFIG_VIDEO_ADV_DEBUG
static int vidioc_g_register(struct file *file, void *priv, static int vidioc_g_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg) struct v4l2_dbg_register *reg)
{ {
...@@ -1457,6 +1458,7 @@ static int vidioc_s_register(struct file *file, void *priv, ...@@ -1457,6 +1458,7 @@ static int vidioc_s_register(struct file *file, void *priv,
} }
return 0; return 0;
} }
#endif
static int vidioc_reqbufs(struct file *file, void *priv, static int vidioc_reqbufs(struct file *file, void *priv,
struct v4l2_requestbuffers *rb) struct v4l2_requestbuffers *rb)
...@@ -1578,8 +1580,8 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = { ...@@ -1578,8 +1580,8 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
#ifdef CONFIG_VIDEO_ADV_DEBUG #ifdef CONFIG_VIDEO_ADV_DEBUG
.vidioc_g_register = vidioc_g_register, .vidioc_g_register = vidioc_g_register,
.vidioc_s_register = vidioc_s_register, .vidioc_s_register = vidioc_s_register,
.vidioc_g_chip_ident = vidioc_g_chip_ident,
#endif #endif
.vidioc_g_chip_ident = vidioc_g_chip_ident,
#ifdef CONFIG_VIDEO_V4L1_COMPAT #ifdef CONFIG_VIDEO_V4L1_COMPAT
.vidiocgmbuf = vidiocgmbuf, .vidiocgmbuf = vidiocgmbuf,
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册