Commit 35deba32 authored by Frank Schaefer's avatar Frank Schaefer Committed by Mauro Carvalho Chehab

[media] em28xx: make ioctl VIDIOC_DBG_G_CHIP_IDENT available without...

[media] em28xx: make ioctl VIDIOC_DBG_G_CHIP_IDENT available without CONFIG_VIDEO_ADV_DEBUG selected

VIDIOC_DBG_G_CHIP_IDENT is a "normal" and not an "advanced" debug functionality.
Signed-off-by: default avatarFrank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent eb17cee2
...@@ -1204,19 +1204,6 @@ static int vidioc_s_frequency(struct file *file, void *priv, ...@@ -1204,19 +1204,6 @@ static int vidioc_s_frequency(struct file *file, void *priv,
return 0; return 0;
} }
#ifdef CONFIG_VIDEO_ADV_DEBUG
static int em28xx_reg_len(int reg)
{
switch (reg) {
case EM28XX_R40_AC97LSB:
case EM28XX_R30_HSCALELOW:
case EM28XX_R32_VSCALELOW:
return 2;
default:
return 1;
}
}
static int vidioc_g_chip_ident(struct file *file, void *priv, static int vidioc_g_chip_ident(struct file *file, void *priv,
struct v4l2_dbg_chip_ident *chip) struct v4l2_dbg_chip_ident *chip)
{ {
...@@ -1239,6 +1226,18 @@ static int vidioc_g_chip_ident(struct file *file, void *priv, ...@@ -1239,6 +1226,18 @@ static int vidioc_g_chip_ident(struct file *file, void *priv,
return 0; return 0;
} }
#ifdef CONFIG_VIDEO_ADV_DEBUG
static int em28xx_reg_len(int reg)
{
switch (reg) {
case EM28XX_R40_AC97LSB:
case EM28XX_R30_HSCALELOW:
case EM28XX_R32_VSCALELOW:
return 2;
default:
return 1;
}
}
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)
...@@ -1662,10 +1661,10 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = { ...@@ -1662,10 +1661,10 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
.vidioc_s_frequency = vidioc_s_frequency, .vidioc_s_frequency = vidioc_s_frequency,
.vidioc_subscribe_event = v4l2_ctrl_subscribe_event, .vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
.vidioc_unsubscribe_event = v4l2_event_unsubscribe, .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
.vidioc_g_chip_ident = vidioc_g_chip_ident,
#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
}; };
......
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