upd64031a.c (b530a447bb588fdf43fdf4eb909e4ee1921d47ac) | upd64031a.c (977ba3b1b73f24fae2d0c8bd59d7a4696f1e0ccc) |
---|---|
1/* 2 * upd64031A - NEC Electronics Ghost Reduction for NTSC in Japan 3 * 4 * 2003 by T.Adachi <tadachi@tadachi-net.com> 5 * 2003 by Takeru KOMORIYA <komoriya@paken.org> 6 * 2006 by Hans Verkuil <hverkuil@xs4all.nl> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 161 unchanged lines hidden (view full) --- 170 return -EINVAL; 171 if (!capable(CAP_SYS_ADMIN)) 172 return -EPERM; 173 reg->val = upd64031a_read(sd, reg->reg & 0xff); 174 reg->size = 1; 175 return 0; 176} 177 | 1/* 2 * upd64031A - NEC Electronics Ghost Reduction for NTSC in Japan 3 * 4 * 2003 by T.Adachi <tadachi@tadachi-net.com> 5 * 2003 by Takeru KOMORIYA <komoriya@paken.org> 6 * 2006 by Hans Verkuil <hverkuil@xs4all.nl> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 161 unchanged lines hidden (view full) --- 170 return -EINVAL; 171 if (!capable(CAP_SYS_ADMIN)) 172 return -EPERM; 173 reg->val = upd64031a_read(sd, reg->reg & 0xff); 174 reg->size = 1; 175 return 0; 176} 177 |
178static int upd64031a_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 178static int upd64031a_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
179{ 180 struct i2c_client *client = v4l2_get_subdevdata(sd); 181 182 if (!v4l2_chip_match_i2c_client(client, ®->match)) 183 return -EINVAL; 184 if (!capable(CAP_SYS_ADMIN)) 185 return -EPERM; 186 upd64031a_write(sd, reg->reg & 0xff, reg->val & 0xff); --- 88 unchanged lines hidden --- | 179{ 180 struct i2c_client *client = v4l2_get_subdevdata(sd); 181 182 if (!v4l2_chip_match_i2c_client(client, ®->match)) 183 return -EINVAL; 184 if (!capable(CAP_SYS_ADMIN)) 185 return -EPERM; 186 upd64031a_write(sd, reg->reg & 0xff, reg->val & 0xff); --- 88 unchanged lines hidden --- |