summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7127.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-02-27 20:06:09 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2007-02-27 20:06:09 +0100
commitef5e52021856647afdbf2f88b5564cb22250290b (patch)
tree066a0a5ba8a5e5051ce91868dc830c39ceab7624 /linux/drivers/media/video/saa7127.c
parent89332c1ec9b859922645e86f2fef316ebdc3ff28 (diff)
downloadmediapointer-dvb-s2-ef5e52021856647afdbf2f88b5564cb22250290b.tar.gz
mediapointer-dvb-s2-ef5e52021856647afdbf2f88b5564cb22250290b.tar.bz2
Improve VIDIOC_G_CHIP_IDENT (better diagnostics)
From: Hans Verkuil <hverkuil@xs4all.nl> Simplify the VIDIOC_G_CHIP_IDENT implementation by adding a single common function. The ident can now also return NONE: not found, UNKNOWN: found, but we don't know what chip it is, and AMBIGUOUS: multiple chips were matched so the match values were too general. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/saa7127.c')
-rw-r--r--linux/drivers/media/video/saa7127.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/linux/drivers/media/video/saa7127.c b/linux/drivers/media/video/saa7127.c
index 28306f15d..185eb7e9d 100644
--- a/linux/drivers/media/video/saa7127.c
+++ b/linux/drivers/media/video/saa7127.c
@@ -664,15 +664,7 @@ static int saa7127_command(struct i2c_client *client,
}
case VIDIOC_G_CHIP_IDENT:
- {
- struct v4l2_chip_ident *chip = arg;
-
- if (!v4l2_chip_match_i2c_client(client, chip->match_type, chip->match_chip))
- return -EINVAL;
- chip->ident = state->ident;
- chip->revision = 0;
- break;
- }
+ return v4l2_chip_ident_i2c_client(client, arg, state->ident, 0);
default:
return -EINVAL;