summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-01-22 18:31:53 -0800
committerTrent Piepho <xyzzy@speakeasy.org>2007-01-22 18:31:53 -0800
commitaafc760ef56b4f913b2d26e8774e1b030d83f2f4 (patch)
tree755f97510cc5b2a5fd50f71ed3db38078823f6fd /linux/drivers/media/video
parentf01b6a9483f1dc1f6cb992ff34f75b2727805a8d (diff)
downloadmediapointer-dvb-s2-aafc760ef56b4f913b2d26e8774e1b030d83f2f4.tar.gz
mediapointer-dvb-s2-aafc760ef56b4f913b2d26e8774e1b030d83f2f4.tar.bz2
Restore VIDIOC_INT_[SG]_REGISTER calls
From: Trent Piepho <xyzzy@speakeasy.org> Add support for these ioctls to the video_ioctl2 system and the cx88 driver. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c17
-rw-r--r--linux/drivers/media/video/videodev.c16
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) {