diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-12-30 05:14:19 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-02 14:11:52 -0500 |
commit | aecde8b53b8ee1330a5a8206200f0d6b8845a6e0 (patch) | |
tree | 53a1aef6597a9d829864c054230b312010abc3a7 /drivers/media/video/cafe_ccic.c | |
parent | da1b5c95e49bb564ae8c61ed135d34ed09acbb66 (diff) |
V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID.
Since the i2c driver ID will be removed in the near future we have to
modify the v4l2 debugging API to use the driver name instead of driver ID.
Note that this API is not used in applications other than v4l2-dbg.cpp
as it is for debugging and testing only.
Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged
with a warning that it is deprecated and will be removed in 2.6.30.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cafe_ccic.c')
-rw-r--r-- | drivers/media/video/cafe_ccic.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index 476171cf5001..34a39d2e4703 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/cafe_ccic.c | |||
@@ -859,7 +859,7 @@ static int __cafe_cam_reset(struct cafe_camera *cam) | |||
859 | */ | 859 | */ |
860 | static int cafe_cam_init(struct cafe_camera *cam) | 860 | static int cafe_cam_init(struct cafe_camera *cam) |
861 | { | 861 | { |
862 | struct v4l2_chip_ident chip = { V4L2_CHIP_MATCH_I2C_ADDR, 0, 0, 0 }; | 862 | struct v4l2_dbg_chip_ident chip; |
863 | int ret; | 863 | int ret; |
864 | 864 | ||
865 | mutex_lock(&cam->s_mutex); | 865 | mutex_lock(&cam->s_mutex); |
@@ -869,8 +869,9 @@ static int cafe_cam_init(struct cafe_camera *cam) | |||
869 | ret = __cafe_cam_reset(cam); | 869 | ret = __cafe_cam_reset(cam); |
870 | if (ret) | 870 | if (ret) |
871 | goto out; | 871 | goto out; |
872 | chip.match_chip = cam->sensor->addr; | 872 | chip.match.type = V4L2_CHIP_MATCH_I2C_ADDR; |
873 | ret = __cafe_cam_cmd(cam, VIDIOC_G_CHIP_IDENT, &chip); | 873 | chip.match.addr = cam->sensor->addr; |
874 | ret = __cafe_cam_cmd(cam, VIDIOC_DBG_G_CHIP_IDENT, &chip); | ||
874 | if (ret) | 875 | if (ret) |
875 | goto out; | 876 | goto out; |
876 | cam->sensor_type = chip.ident; | 877 | cam->sensor_type = chip.ident; |