aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7127.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/saa7127.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/saa7127.c')
-rw-r--r--drivers/media/video/saa7127.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c
index bfc85654795e..d6848f7a503b 100644
--- a/drivers/media/video/saa7127.c
+++ b/drivers/media/video/saa7127.c
@@ -623,25 +623,24 @@ static int saa7127_s_vbi_data(struct v4l2_subdev *sd, const struct v4l2_sliced_v
623} 623}
624 624
625#ifdef CONFIG_VIDEO_ADV_DEBUG 625#ifdef CONFIG_VIDEO_ADV_DEBUG
626static int saa7127_g_register(struct v4l2_subdev *sd, struct v4l2_register *reg) 626static int saa7127_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
627{ 627{
628 struct i2c_client *client = v4l2_get_subdevdata(sd); 628 struct i2c_client *client = v4l2_get_subdevdata(sd);
629 629
630 if (!v4l2_chip_match_i2c_client(client, 630 if (!v4l2_chip_match_i2c_client(client, &reg->match))
631 reg->match_type, reg->match_chip))
632 return -EINVAL; 631 return -EINVAL;
633 if (!capable(CAP_SYS_ADMIN)) 632 if (!capable(CAP_SYS_ADMIN))
634 return -EPERM; 633 return -EPERM;
635 reg->val = saa7127_read(sd, reg->reg & 0xff); 634 reg->val = saa7127_read(sd, reg->reg & 0xff);
635 reg->size = 1;
636 return 0; 636 return 0;
637} 637}
638 638
639static int saa7127_s_register(struct v4l2_subdev *sd, struct v4l2_register *reg) 639static int saa7127_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
640{ 640{
641 struct i2c_client *client = v4l2_get_subdevdata(sd); 641 struct i2c_client *client = v4l2_get_subdevdata(sd);
642 642
643 if (!v4l2_chip_match_i2c_client(client, 643 if (!v4l2_chip_match_i2c_client(client, &reg->match))
644 reg->match_type, reg->match_chip))
645 return -EINVAL; 644 return -EINVAL;
646 if (!capable(CAP_SYS_ADMIN)) 645 if (!capable(CAP_SYS_ADMIN))
647 return -EPERM; 646 return -EPERM;
@@ -650,7 +649,7 @@ static int saa7127_s_register(struct v4l2_subdev *sd, struct v4l2_register *reg)
650} 649}
651#endif 650#endif
652 651
653static int saa7127_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_chip_ident *chip) 652static int saa7127_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
654{ 653{
655 struct saa7127_state *state = to_state(sd); 654 struct saa7127_state *state = to_state(sd);
656 struct i2c_client *client = v4l2_get_subdevdata(sd); 655 struct i2c_client *client = v4l2_get_subdevdata(sd);