summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/common')
-rw-r--r--linux/drivers/media/common/saa7146_i2c.c6
-rw-r--r--linux/drivers/media/common/saa7146_video.c2
2 files changed, 3 insertions, 5 deletions
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c
index fa9d4f90a..ce4f102ad 100644
--- a/linux/drivers/media/common/saa7146_i2c.c
+++ b/linux/drivers/media/common/saa7146_i2c.c
@@ -414,9 +414,9 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c
saa7146_i2c_reset(dev);
if (i2c_adapter) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
- /* For kernels > 2.6.22 it can actually be NULL
- when v4l2_subdev is used. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
+ /* For kernels >= 2.6.26 the class field is actually
+ always 0, so only do this test for older kernels. */
BUG_ON(!i2c_adapter->class);
#endif
i2c_set_adapdata(i2c_adapter, &dev->v4l2_dev);
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c
index ace925134..46c59da56 100644
--- a/linux/drivers/media/common/saa7146_video.c
+++ b/linux/drivers/media/common/saa7146_video.c
@@ -724,8 +724,6 @@ static int vidioc_g_parm(struct file *file, void *fh,
struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
struct saa7146_vv *vv = dev->vv_data;
- if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
- return -EINVAL;
parm->parm.capture.readbuffers = 1;
v4l2_video_std_frame_period(vv->standard->id,
&parm->parm.capture.timeperframe);