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/tvp5150.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/tvp5150.c')
-rw-r--r-- | drivers/media/video/tvp5150.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index a388a9f0cb18..2cd64ef27b95 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c | |||
@@ -963,7 +963,7 @@ static int tvp5150_g_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt) | |||
963 | 963 | ||
964 | 964 | ||
965 | static int tvp5150_g_chip_ident(struct v4l2_subdev *sd, | 965 | static int tvp5150_g_chip_ident(struct v4l2_subdev *sd, |
966 | struct v4l2_chip_ident *chip) | 966 | struct v4l2_dbg_chip_ident *chip) |
967 | { | 967 | { |
968 | int rev; | 968 | int rev; |
969 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 969 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
@@ -977,25 +977,24 @@ static int tvp5150_g_chip_ident(struct v4l2_subdev *sd, | |||
977 | 977 | ||
978 | 978 | ||
979 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 979 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
980 | static int tvp5150_g_register(struct v4l2_subdev *sd, struct v4l2_register *reg) | 980 | static int tvp5150_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) |
981 | { | 981 | { |
982 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 982 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
983 | 983 | ||
984 | if (!v4l2_chip_match_i2c_client(client, | 984 | if (!v4l2_chip_match_i2c_client(client, ®->match)) |
985 | reg->match_type, reg->match_chip)) | ||
986 | return -EINVAL; | 985 | return -EINVAL; |
987 | if (!capable(CAP_SYS_ADMIN)) | 986 | if (!capable(CAP_SYS_ADMIN)) |
988 | return -EPERM; | 987 | return -EPERM; |
989 | reg->val = tvp5150_read(sd, reg->reg & 0xff); | 988 | reg->val = tvp5150_read(sd, reg->reg & 0xff); |
989 | reg->size = 1; | ||
990 | return 0; | 990 | return 0; |
991 | } | 991 | } |
992 | 992 | ||
993 | static int tvp5150_s_register(struct v4l2_subdev *sd, struct v4l2_register *reg) | 993 | static int tvp5150_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) |
994 | { | 994 | { |
995 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 995 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
996 | 996 | ||
997 | if (!v4l2_chip_match_i2c_client(client, | 997 | if (!v4l2_chip_match_i2c_client(client, ®->match)) |
998 | reg->match_type, reg->match_chip)) | ||
999 | return -EINVAL; | 998 | return -EINVAL; |
1000 | if (!capable(CAP_SYS_ADMIN)) | 999 | if (!capable(CAP_SYS_ADMIN)) |
1001 | return -EPERM; | 1000 | return -EPERM; |