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/pvrusb2/pvrusb2-hdw.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/pvrusb2/pvrusb2-hdw.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 4358079f1966..8fb92ac78c7b 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -4732,26 +4732,25 @@ static int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw) | |||
4732 | 4732 | ||
4733 | 4733 | ||
4734 | int pvr2_hdw_register_access(struct pvr2_hdw *hdw, | 4734 | int pvr2_hdw_register_access(struct pvr2_hdw *hdw, |
4735 | u32 match_type, u32 match_chip, u64 reg_id, | 4735 | struct v4l2_dbg_match *match, u64 reg_id, |
4736 | int setFl,u64 *val_ptr) | 4736 | int setFl, u64 *val_ptr) |
4737 | { | 4737 | { |
4738 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 4738 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
4739 | struct pvr2_i2c_client *cp; | 4739 | struct pvr2_i2c_client *cp; |
4740 | struct v4l2_register req; | 4740 | struct v4l2_dbg_register req; |
4741 | int stat = 0; | 4741 | int stat = 0; |
4742 | int okFl = 0; | 4742 | int okFl = 0; |
4743 | 4743 | ||
4744 | if (!capable(CAP_SYS_ADMIN)) return -EPERM; | 4744 | if (!capable(CAP_SYS_ADMIN)) return -EPERM; |
4745 | 4745 | ||
4746 | req.match_type = match_type; | 4746 | req.match = *match; |
4747 | req.match_chip = match_chip; | ||
4748 | req.reg = reg_id; | 4747 | req.reg = reg_id; |
4749 | if (setFl) req.val = *val_ptr; | 4748 | if (setFl) req.val = *val_ptr; |
4750 | mutex_lock(&hdw->i2c_list_lock); do { | 4749 | mutex_lock(&hdw->i2c_list_lock); do { |
4751 | list_for_each_entry(cp, &hdw->i2c_clients, list) { | 4750 | list_for_each_entry(cp, &hdw->i2c_clients, list) { |
4752 | if (!v4l2_chip_match_i2c_client( | 4751 | if (!v4l2_chip_match_i2c_client( |
4753 | cp->client, | 4752 | cp->client, |
4754 | req.match_type, req.match_chip)) { | 4753 | &req.match)) { |
4755 | continue; | 4754 | continue; |
4756 | } | 4755 | } |
4757 | stat = pvr2_i2c_client_cmd( | 4756 | stat = pvr2_i2c_client_cmd( |