diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-02-23 18:55:14 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-03-01 10:09:44 -0500 |
commit | f3d092b84a855c44914fea0648695bef7d751266 (patch) | |
tree | 3ae7a87e18e83be2a39e00a2ae29f26299d1c272 /drivers/media/video/cx88/cx88-video.c | |
parent | d55c7aec666658495e5b57a6b194c8c2a1ac255f (diff) |
V4L/DVB (5304): Improve chip matching in v4l2_register
The chip matching in struct v4l2_register for VIDIOC_DBG_G/S_REGISTER
was rather primitive. It could not be extended to other busses besides
i2c and it lacked a way to.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-video.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index a97be1bdc31d..bdfe2af70124 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -1389,7 +1389,7 @@ static int vidioc_g_register (struct file *file, void *fh, | |||
1389 | { | 1389 | { |
1390 | struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core; | 1390 | struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core; |
1391 | 1391 | ||
1392 | if (reg->i2c_id != 0) | 1392 | if (!v4l2_chip_match_host(reg->match_type, reg->match_chip)) |
1393 | return -EINVAL; | 1393 | return -EINVAL; |
1394 | /* cx2388x has a 24-bit register space */ | 1394 | /* cx2388x has a 24-bit register space */ |
1395 | reg->val = cx_read(reg->reg&0xffffff); | 1395 | reg->val = cx_read(reg->reg&0xffffff); |
@@ -1401,7 +1401,7 @@ static int vidioc_s_register (struct file *file, void *fh, | |||
1401 | { | 1401 | { |
1402 | struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core; | 1402 | struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core; |
1403 | 1403 | ||
1404 | if (reg->i2c_id != 0) | 1404 | if (!v4l2_chip_match_host(reg->match_type, reg->match_chip)) |
1405 | return -EINVAL; | 1405 | return -EINVAL; |
1406 | cx_write(reg->reg&0xffffff, reg->val); | 1406 | cx_write(reg->reg&0xffffff, reg->val); |
1407 | return 0; | 1407 | return 0; |