diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-02-27 20:10:15 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2007-02-27 20:10:15 +0100 |
commit | 95f91de57e3412b6cad75d2b8ed83545e8e30217 (patch) | |
tree | 5bef46539848c392ff5617c4efe29fd1394dcab3 /linux/drivers/media/video/ivtv/ivtv-ioctl.c | |
parent | ef5e52021856647afdbf2f88b5564cb22250290b (diff) | |
download | mediapointer-dvb-s2-95f91de57e3412b6cad75d2b8ed83545e8e30217.tar.gz mediapointer-dvb-s2-95f91de57e3412b6cad75d2b8ed83545e8e30217.tar.bz2 |
Update ivtv VIDIOC_G_CHIP_IDENT.
From: Hans Verkuil <hverkuil@xs4all.nl>
ivtv now sets the correct chip ident and returns the correct error codes.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-ioctl.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-ioctl.c b/linux/drivers/media/video/ivtv/ivtv-ioctl.c index 36af92e50..f8107e337 100644 --- a/linux/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/linux/drivers/media/video/ivtv/ivtv-ioctl.c @@ -662,18 +662,26 @@ static int ivtv_internal_ioctls(struct file *filp, unsigned int cmd, void *arg) return ivtv_i2c_id(itv, reg->match_chip, cmd, arg); return ivtv_call_i2c_client(itv, reg->match_chip, cmd, arg); - case VIDIOC_G_CHIP_IDENT: + case VIDIOC_G_CHIP_IDENT: { + struct v4l2_chip_ident *chip = arg; + IVTV_DEBUG_IOCTL("VIDIOC_G_CHIP_IDENT\n"); - if (v4l2_chip_match_host(reg->match_type, reg->match_chip)) { - struct v4l2_chip_ident *chip = arg; + chip->ident = V4L2_IDENT_NONE; + chip->revision = 0; + if (reg->match_type == V4L2_CHIP_MATCH_HOST) { + if (v4l2_chip_match_host(reg->match_type, reg->match_chip)) { + struct v4l2_chip_ident *chip = arg; - chip->ident = itv->has_cx23415 ? V4L2_IDENT_CX23415 : V4L2_IDENT_CX23416; - chip->revision = 0; + chip->ident = itv->has_cx23415 ? V4L2_IDENT_CX23415 : V4L2_IDENT_CX23416; + } return 0; } if (reg->match_type == V4L2_CHIP_MATCH_I2C_DRIVER) return ivtv_i2c_id(itv, reg->match_chip, cmd, arg); - return ivtv_call_i2c_client(itv, reg->match_chip, cmd, arg); + if (reg->match_type == V4L2_CHIP_MATCH_I2C_ADDR) + return ivtv_call_i2c_client(itv, reg->match_chip, cmd, arg); + return -EINVAL; + } case VIDIOC_INT_S_AUDIO_ROUTING: { struct v4l2_routing *route = arg; |