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/upd64031a.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/upd64031a.c')
-rw-r--r-- | drivers/media/video/upd64031a.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/video/upd64031a.c b/drivers/media/video/upd64031a.c index 7a609a3a6dbe..4f16effb530f 100644 --- a/drivers/media/video/upd64031a.c +++ b/drivers/media/video/upd64031a.c | |||
@@ -147,7 +147,7 @@ static int upd64031a_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing | |||
147 | return upd64031a_s_frequency(sd, NULL); | 147 | return upd64031a_s_frequency(sd, NULL); |
148 | } | 148 | } |
149 | 149 | ||
150 | static int upd64031a_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_chip_ident *chip) | 150 | static int upd64031a_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip) |
151 | { | 151 | { |
152 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 152 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
153 | 153 | ||
@@ -162,25 +162,24 @@ static int upd64031a_log_status(struct v4l2_subdev *sd) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 164 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
165 | static int upd64031a_g_register(struct v4l2_subdev *sd, struct v4l2_register *reg) | 165 | static int upd64031a_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) |
166 | { | 166 | { |
167 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 167 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
168 | 168 | ||
169 | if (!v4l2_chip_match_i2c_client(client, | 169 | if (!v4l2_chip_match_i2c_client(client, ®->match)) |
170 | reg->match_type, reg->match_chip)) | ||
171 | return -EINVAL; | 170 | return -EINVAL; |
172 | if (!capable(CAP_SYS_ADMIN)) | 171 | if (!capable(CAP_SYS_ADMIN)) |
173 | return -EPERM; | 172 | return -EPERM; |
174 | reg->val = upd64031a_read(sd, reg->reg & 0xff); | 173 | reg->val = upd64031a_read(sd, reg->reg & 0xff); |
174 | reg->size = 1; | ||
175 | return 0; | 175 | return 0; |
176 | } | 176 | } |
177 | 177 | ||
178 | static int upd64031a_s_register(struct v4l2_subdev *sd, struct v4l2_register *reg) | 178 | static int upd64031a_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) |
179 | { | 179 | { |
180 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 180 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
181 | 181 | ||
182 | if (!v4l2_chip_match_i2c_client(client, | 182 | if (!v4l2_chip_match_i2c_client(client, ®->match)) |
183 | reg->match_type, reg->match_chip)) | ||
184 | return -EINVAL; | 183 | return -EINVAL; |
185 | if (!capable(CAP_SYS_ADMIN)) | 184 | if (!capable(CAP_SYS_ADMIN)) |
186 | return -EPERM; | 185 | return -EPERM; |