aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7115.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-12-30 05:14:19 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-02 14:11:52 -0500
commitaecde8b53b8ee1330a5a8206200f0d6b8845a6e0 (patch)
tree53a1aef6597a9d829864c054230b312010abc3a7 /drivers/media/video/saa7115.c
parentda1b5c95e49bb564ae8c61ed135d34ed09acbb66 (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/saa7115.c')
-rw-r--r--drivers/media/video/saa7115.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c
index 22708ecdf1bb..46c796c3fec8 100644
--- a/drivers/media/video/saa7115.c
+++ b/drivers/media/video/saa7115.c
@@ -1371,25 +1371,24 @@ static int saa711x_g_vbi_data(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_dat
1371} 1371}
1372 1372
1373#ifdef CONFIG_VIDEO_ADV_DEBUG 1373#ifdef CONFIG_VIDEO_ADV_DEBUG
1374static int saa711x_g_register(struct v4l2_subdev *sd, struct v4l2_register *reg) 1374static int saa711x_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
1375{ 1375{
1376 struct i2c_client *client = v4l2_get_subdevdata(sd); 1376 struct i2c_client *client = v4l2_get_subdevdata(sd);
1377 1377
1378 if (!v4l2_chip_match_i2c_client(client, 1378 if (!v4l2_chip_match_i2c_client(client, &reg->match))
1379 reg->match_type, reg->match_chip))
1380 return -EINVAL; 1379 return -EINVAL;
1381 if (!capable(CAP_SYS_ADMIN)) 1380 if (!capable(CAP_SYS_ADMIN))
1382 return -EPERM; 1381 return -EPERM;
1383 reg->val = saa711x_read(sd, reg->reg & 0xff); 1382 reg->val = saa711x_read(sd, reg->reg & 0xff);
1383 reg->size = 1;
1384 return 0; 1384 return 0;
1385} 1385}
1386 1386
1387static int saa711x_s_register(struct v4l2_subdev *sd, struct v4l2_register *reg) 1387static int saa711x_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
1388{ 1388{
1389 struct i2c_client *client = v4l2_get_subdevdata(sd); 1389 struct i2c_client *client = v4l2_get_subdevdata(sd);
1390 1390
1391 if (!v4l2_chip_match_i2c_client(client, 1391 if (!v4l2_chip_match_i2c_client(client, &reg->match))
1392 reg->match_type, reg->match_chip))
1393 return -EINVAL; 1392 return -EINVAL;
1394 if (!capable(CAP_SYS_ADMIN)) 1393 if (!capable(CAP_SYS_ADMIN))
1395 return -EPERM; 1394 return -EPERM;
@@ -1398,7 +1397,7 @@ static int saa711x_s_register(struct v4l2_subdev *sd, struct v4l2_register *reg)
1398} 1397}
1399#endif 1398#endif
1400 1399
1401static int saa711x_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_chip_ident *chip) 1400static int saa711x_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
1402{ 1401{
1403 struct saa711x_state *state = to_state(sd); 1402 struct saa711x_state *state = to_state(sd);
1404 struct i2c_client *client = v4l2_get_subdevdata(sd); 1403 struct i2c_client *client = v4l2_get_subdevdata(sd);