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/upd64083.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/upd64083.c')
-rw-r--r-- | drivers/media/video/upd64083.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/video/upd64083.c b/drivers/media/video/upd64083.c index 58412cb9c01a..4b712f69d1b7 100644 --- a/drivers/media/video/upd64083.c +++ b/drivers/media/video/upd64083.c | |||
@@ -120,25 +120,24 @@ static int upd64083_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing | |||
120 | } | 120 | } |
121 | 121 | ||
122 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 122 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
123 | static int upd64083_g_register(struct v4l2_subdev *sd, struct v4l2_register *reg) | 123 | static int upd64083_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) |
124 | { | 124 | { |
125 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 125 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
126 | 126 | ||
127 | if (!v4l2_chip_match_i2c_client(client, | 127 | if (!v4l2_chip_match_i2c_client(client, ®->match)) |
128 | reg->match_type, reg->match_chip)) | ||
129 | return -EINVAL; | 128 | return -EINVAL; |
130 | if (!capable(CAP_SYS_ADMIN)) | 129 | if (!capable(CAP_SYS_ADMIN)) |
131 | return -EPERM; | 130 | return -EPERM; |
132 | reg->val = upd64083_read(sd, reg->reg & 0xff); | 131 | reg->val = upd64083_read(sd, reg->reg & 0xff); |
132 | reg->size = 1; | ||
133 | return 0; | 133 | return 0; |
134 | } | 134 | } |
135 | 135 | ||
136 | static int upd64083_s_register(struct v4l2_subdev *sd, struct v4l2_register *reg) | 136 | static int upd64083_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) |
137 | { | 137 | { |
138 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 138 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
139 | 139 | ||
140 | if (!v4l2_chip_match_i2c_client(client, | 140 | if (!v4l2_chip_match_i2c_client(client, ®->match)) |
141 | reg->match_type, reg->match_chip)) | ||
142 | return -EINVAL; | 141 | return -EINVAL; |
143 | if (!capable(CAP_SYS_ADMIN)) | 142 | if (!capable(CAP_SYS_ADMIN)) |
144 | return -EPERM; | 143 | return -EPERM; |
@@ -147,7 +146,7 @@ static int upd64083_s_register(struct v4l2_subdev *sd, struct v4l2_register *reg | |||
147 | } | 146 | } |
148 | #endif | 147 | #endif |
149 | 148 | ||
150 | static int upd64083_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_chip_ident *chip) | 149 | static int upd64083_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip) |
151 | { | 150 | { |
152 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 151 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
153 | 152 | ||