diff options
Diffstat (limited to 'drivers/media/video/cs5345.c')
-rw-r--r-- | drivers/media/video/cs5345.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/video/cs5345.c b/drivers/media/video/cs5345.c index 70fcd0d5de1..14bebf8a116 100644 --- a/drivers/media/video/cs5345.c +++ b/drivers/media/video/cs5345.c | |||
@@ -95,25 +95,24 @@ static int cs5345_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | |||
95 | } | 95 | } |
96 | 96 | ||
97 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 97 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
98 | static int cs5345_g_register(struct v4l2_subdev *sd, struct v4l2_register *reg) | 98 | static int cs5345_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) |
99 | { | 99 | { |
100 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 100 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
101 | 101 | ||
102 | if (!v4l2_chip_match_i2c_client(client, | 102 | if (!v4l2_chip_match_i2c_client(client, ®->match)) |
103 | reg->match_type, reg->match_chip)) | ||
104 | return -EINVAL; | 103 | return -EINVAL; |
105 | if (!capable(CAP_SYS_ADMIN)) | 104 | if (!capable(CAP_SYS_ADMIN)) |
106 | return -EPERM; | 105 | return -EPERM; |
106 | reg->size = 1; | ||
107 | reg->val = cs5345_read(sd, reg->reg & 0x1f); | 107 | reg->val = cs5345_read(sd, reg->reg & 0x1f); |
108 | return 0; | 108 | return 0; |
109 | } | 109 | } |
110 | 110 | ||
111 | static int cs5345_s_register(struct v4l2_subdev *sd, struct v4l2_register *reg) | 111 | static int cs5345_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) |
112 | { | 112 | { |
113 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 113 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
114 | 114 | ||
115 | if (!v4l2_chip_match_i2c_client(client, | 115 | if (!v4l2_chip_match_i2c_client(client, ®->match)) |
116 | reg->match_type, reg->match_chip)) | ||
117 | return -EINVAL; | 116 | return -EINVAL; |
118 | if (!capable(CAP_SYS_ADMIN)) | 117 | if (!capable(CAP_SYS_ADMIN)) |
119 | return -EPERM; | 118 | return -EPERM; |
@@ -122,7 +121,7 @@ static int cs5345_s_register(struct v4l2_subdev *sd, struct v4l2_register *reg) | |||
122 | } | 121 | } |
123 | #endif | 122 | #endif |
124 | 123 | ||
125 | static int cs5345_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_chip_ident *chip) | 124 | static int cs5345_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip) |
126 | { | 125 | { |
127 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 126 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
128 | 127 | ||