diff options
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 17 | ||||
-rw-r--r-- | linux/drivers/media/video/videodev.c | 16 |
2 files changed, 28 insertions, 5 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 8a33b7e16..3ce9759c3 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1666,10 +1666,12 @@ static int vidioc_s_frequency (struct file *file, void *priv, cx88_set_freq (core,f); } -#if 0 //ifdef CONFIG_VIDEO_ADV_DEBUG -static int vidioc_g_register (struct file *file, void *priv, - v4l2_register *reg) +#ifdef CONFIG_VIDEO_ADV_DEBUG +static int vidioc_g_register (struct file *file, void *fh, + struct v4l2_register *reg) { + struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core; + if (reg->i2c_id != 0) return -EINVAL; /* cx2388x has a 24-bit register space */ @@ -1678,8 +1680,9 @@ static int vidioc_g_register (struct file *file, void *priv, } static int vidioc_s_register (struct file *file, void *fh, - v4l2_register *reg) + struct v4l2_register *reg) { + struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core; if (reg->i2c_id != 0) return -EINVAL; @@ -1966,8 +1969,12 @@ static struct video_device cx8800_video_template = .vidioc_s_tuner = vidioc_s_tuner, .vidioc_g_frequency = vidioc_g_frequency, .vidioc_s_frequency = vidioc_s_frequency, +#ifdef CONFIG_VIDEO_ADV_DEBUG + .vidioc_g_register = vidioc_g_register, + .vidioc_s_register = vidioc_s_register, +#endif .tvnorms = CX88_NORMS, - .current_norm = V4L2_STD_NTSC_M, + .current_norm = V4L2_STD_NTSC_M, }; static struct file_operations radio_fops = diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c index b0009fe0f..4789d7f2f 100644 --- a/linux/drivers/media/video/videodev.c +++ b/linux/drivers/media/video/videodev.c @@ -1477,6 +1477,22 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, ret=vfd->vidioc_log_status(file, fh); break; } +#ifdef CONFIG_VIDEO_ADV_DEBUG + case VIDIOC_INT_G_REGISTER: + { + struct v4l2_register *p=arg; + if (vfd->vidioc_g_register) + ret=vfd->vidioc_g_register(file, fh, p); + break; + } + case VIDIOC_INT_S_REGISTER: + { + struct v4l2_register *p=arg; + if (vfd->vidioc_s_register) + ret=vfd->vidioc_s_register(file, fh, p); + break; + } +#endif } /* switch */ if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) { |