diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-02-24 00:55:14 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2007-02-24 00:55:14 +0100 |
commit | 547bf60a782e5d6397e4ed6c001bd1ae0633d8f0 (patch) | |
tree | d5723ea3f30bbf1d07cd8a3725ec886b43b6e3e2 /linux/drivers/media/video/cx88/cx88-video.c | |
parent | 834c26ef6c6e90c342478b0ce181bd0c91af4062 (diff) | |
download | mediapointer-dvb-s2-547bf60a782e5d6397e4ed6c001bd1ae0633d8f0.tar.gz mediapointer-dvb-s2-547bf60a782e5d6397e4ed6c001bd1ae0633d8f0.tar.bz2 |
Improve chip matching in v4l2_register for VIDIOC_DBG_G/S_REGISTER
From: Hans Verkuil <hverkuil@xs4all.nl>
The chip matching in struct v4l2_register was rather primitive. It could
not be extended to other busses besides i2c and it lacked a way to
differentiate between two i2c chips driven by the same driver on one
board (e.g. a PVR500 with two tuner chips, one for analog TV and one for
radio).
It has now been improved making it much more powerful.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
CC: Mike Isely <isely@isely.net>
CC: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-video.c')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 2af3f3d2c..2e6259ceb 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1670,7 +1670,7 @@ static int vidioc_g_register (struct file *file, void *fh, { struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core; - if (reg->i2c_id != 0) + if (!v4l2_chip_match_host(reg->match_type, reg->match_chip)) return -EINVAL; /* cx2388x has a 24-bit register space */ reg->val = cx_read(reg->reg&0xffffff); @@ -1682,7 +1682,7 @@ static int vidioc_s_register (struct file *file, void *fh, { struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core; - if (reg->i2c_id != 0) + if (!v4l2_chip_match_host(reg->match_type, reg->match_chip)) return -EINVAL; cx_write(reg->reg&0xffffff, reg->val); return 0; |