diff options
Diffstat (limited to 'drivers/media/video/m52790.c')
-rw-r--r-- | drivers/media/video/m52790.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/video/m52790.c b/drivers/media/video/m52790.c index 07be14a9fe7b..de397ef57b44 100644 --- a/drivers/media/video/m52790.c +++ b/drivers/media/video/m52790.c | |||
@@ -80,29 +80,28 @@ static int m52790_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r | |||
80 | } | 80 | } |
81 | 81 | ||
82 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 82 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
83 | static int m52790_g_register(struct v4l2_subdev *sd, struct v4l2_register *reg) | 83 | static int m52790_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) |
84 | { | 84 | { |
85 | struct m52790_state *state = to_state(sd); | 85 | struct m52790_state *state = to_state(sd); |
86 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 86 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
87 | 87 | ||
88 | if (!v4l2_chip_match_i2c_client(client, | 88 | if (!v4l2_chip_match_i2c_client(client, ®->match)) |
89 | reg->match_type, reg->match_chip)) | ||
90 | return -EINVAL; | 89 | return -EINVAL; |
91 | if (!capable(CAP_SYS_ADMIN)) | 90 | if (!capable(CAP_SYS_ADMIN)) |
92 | return -EPERM; | 91 | return -EPERM; |
93 | if (reg->reg != 0) | 92 | if (reg->reg != 0) |
94 | return -EINVAL; | 93 | return -EINVAL; |
94 | reg->size = 1; | ||
95 | reg->val = state->input | state->output; | 95 | reg->val = state->input | state->output; |
96 | return 0; | 96 | return 0; |
97 | } | 97 | } |
98 | 98 | ||
99 | static int m52790_s_register(struct v4l2_subdev *sd, struct v4l2_register *reg) | 99 | static int m52790_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) |
100 | { | 100 | { |
101 | struct m52790_state *state = to_state(sd); | 101 | struct m52790_state *state = to_state(sd); |
102 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 102 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
103 | 103 | ||
104 | if (!v4l2_chip_match_i2c_client(client, | 104 | if (!v4l2_chip_match_i2c_client(client, ®->match)) |
105 | reg->match_type, reg->match_chip)) | ||
106 | return -EINVAL; | 105 | return -EINVAL; |
107 | if (!capable(CAP_SYS_ADMIN)) | 106 | if (!capable(CAP_SYS_ADMIN)) |
108 | return -EPERM; | 107 | return -EPERM; |
@@ -115,7 +114,7 @@ static int m52790_s_register(struct v4l2_subdev *sd, struct v4l2_register *reg) | |||
115 | } | 114 | } |
116 | #endif | 115 | #endif |
117 | 116 | ||
118 | static int m52790_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_chip_ident *chip) | 117 | static int m52790_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip) |
119 | { | 118 | { |
120 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 119 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
121 | 120 | ||