From bd16f634ca88082a992fd51a9f2a94b83ead6a78 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 26 Jan 2009 23:13:05 +0100 Subject: saa7146: fix VIDIOC_ENUMSTD. From: Hans Verkuil The previous conversion to video_ioctl2 broke VIDIOC_ENUMSTD. This is now fixed. Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/common/saa7146_fops.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/common/saa7146_fops.c b/linux/drivers/media/common/saa7146_fops.c index 4384bd16c..c6cc8574a 100644 --- a/linux/drivers/media/common/saa7146_fops.c +++ b/linux/drivers/media/common/saa7146_fops.c @@ -512,6 +512,7 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev, struct saa7146_vv *vv = dev->vv_data; struct video_device *vfd; int err; + int i; DEB_EE(("dev:%p, name:'%s', type:%d\n",dev,name,type)); @@ -521,9 +522,11 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev, return -ENOMEM; vfd->fops = &video_fops; - vfd->ioctl_ops = dev->ext_vv_data ? &dev->ext_vv_data->ops : - &saa7146_video_ioctl_ops; + vfd->ioctl_ops = &dev->ext_vv_data->ops; vfd->release = video_device_release; + vfd->tvnorms = 0; + for (i = 0; i < dev->ext_vv_data->num_stds; i++) + vfd->tvnorms |= dev->ext_vv_data->stds[i].id; strlcpy(vfd->name, name, sizeof(vfd->name)); video_set_drvdata(vfd, dev); -- cgit v1.2.3 From 662705dd5c574972df7a0698fe912f845ac54475 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 27 Jan 2009 10:20:34 +0100 Subject: cx25840: ignore TUNER_SET_CONFIG in the command callback. From: Hans Verkuil These days TUNER_SET_CONFIG is broadcast to the other i2c devices and that triggers a fw load on the cx25840. Ignore this command since cx25840 isn't a tuner and you really do not want to load the firmware that early. Priority: high Signed-off-by: Hans Verkuil --- linux/drivers/media/video/cx25840/cx25840-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index 6d324002a..57e80717f 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -1412,7 +1412,7 @@ static int cx25840_log_status(struct v4l2_subdev *sd) static int cx25840_command(struct i2c_client *client, unsigned cmd, void *arg) { /* ignore this command */ - if (cmd == TUNER_SET_TYPE_ADDR) + if (cmd == TUNER_SET_TYPE_ADDR || cmd == TUNER_SET_CONFIG) return 0; /* Old-style drivers rely on initialization on first use, so -- cgit v1.2.3