Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366756
b: refs/heads/master
c: 977ba3b
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 24, 2013
1 parent 762de09 commit 18b71a0
Show file tree
Hide file tree
Showing 70 changed files with 97 additions and 103 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5656e8b7363c4e248e6372dc34828d3dfb17832
refs/heads/master: 977ba3b1b73f24fae2d0c8bd59d7a4696f1e0ccc
2 changes: 1 addition & 1 deletion trunk/drivers/media/dvb-frontends/au8522_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ static int au8522_g_register(struct v4l2_subdev *sd,
}

static int au8522_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct au8522_state *state = to_state(sd);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/ad9389b.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ static int ad9389b_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
return 0;
}

static int ad9389b_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int ad9389b_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/adv7183.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ static int adv7183_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
return 0;
}

static int adv7183_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int adv7183_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/adv7604.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ static int adv7604_g_register(struct v4l2_subdev *sd,
}

static int adv7604_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/ak881x.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static int ak881x_g_register(struct v4l2_subdev *sd,
}

static int ak881x_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/cs5345.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static int cs5345_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *r
return 0;
}

static int cs5345_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int cs5345_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/cx25840/cx25840-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ static int cx25840_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
return 0;
}

static int cx25840_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int cx25840_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/m52790.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int m52790_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *r
return 0;
}

static int m52790_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int m52790_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct m52790_state *state = to_state(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/mt9m032.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ static int mt9m032_g_register(struct v4l2_subdev *sd,
}

static int mt9m032_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct mt9m032 *sensor = to_mt9m032(sd);
struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/mt9v011.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ static int mt9v011_g_register(struct v4l2_subdev *sd,
}

static int mt9v011_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/ov7670.c
Original file line number Diff line number Diff line change
Expand Up @@ -1487,7 +1487,7 @@ static int ov7670_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *r
return ret;
}

static int ov7670_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int ov7670_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/saa7115.c
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ static int saa711x_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
return 0;
}

static int saa711x_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int saa711x_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/saa7127.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ static int saa7127_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
return 0;
}

static int saa7127_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int saa7127_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/saa717x.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ static int saa717x_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
return 0;
}

static int saa717x_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int saa717x_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
u16 addr = reg->reg & 0xffff;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/soc_camera/mt9m001.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ static int mt9m001_g_register(struct v4l2_subdev *sd,
}

static int mt9m001_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/soc_camera/mt9m111.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ static int mt9m111_g_register(struct v4l2_subdev *sd,
}

static int mt9m111_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/soc_camera/mt9t031.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ static int mt9t031_g_register(struct v4l2_subdev *sd,
}

static int mt9t031_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/soc_camera/mt9t112.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ static int mt9t112_g_register(struct v4l2_subdev *sd,
}

static int mt9t112_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/soc_camera/mt9v022.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ static int mt9v022_g_register(struct v4l2_subdev *sd,
}

static int mt9v022_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/soc_camera/ov2640.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ static int ov2640_g_register(struct v4l2_subdev *sd,
}

static int ov2640_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/soc_camera/ov5642.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ static int ov5642_get_register(struct v4l2_subdev *sd, struct v4l2_dbg_register
return ret;
}

static int ov5642_set_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int ov5642_set_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/soc_camera/ov6650.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ static int ov6650_get_register(struct v4l2_subdev *sd,
}

static int ov6650_set_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/soc_camera/ov772x.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ static int ov772x_g_register(struct v4l2_subdev *sd,
}

static int ov772x_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/soc_camera/ov9640.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ static int ov9640_get_register(struct v4l2_subdev *sd,
}

static int ov9640_set_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/soc_camera/ov9740.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ static int ov9740_get_register(struct v4l2_subdev *sd,
}

static int ov9740_set_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/soc_camera/rj54n1cb0c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ static int rj54n1_g_register(struct v4l2_subdev *sd,
}

static int rj54n1_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/soc_camera/tw9910.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ static int tw9910_g_register(struct v4l2_subdev *sd,
}

static int tw9910_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/ths7303.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static int ths7303_g_register(struct v4l2_subdev *sd,
}

static int ths7303_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/tvp5150.c
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ static int tvp5150_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
return 0;
}

static int tvp5150_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int tvp5150_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/tvp7002.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ static int tvp7002_g_register(struct v4l2_subdev *sd,
* -EPERM if call not allowed.
*/
static int tvp7002_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/upd64031a.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static int upd64031a_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register
return 0;
}

static int upd64031a_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int upd64031a_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/upd64083.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static int upd64083_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register
return 0;
}

static int upd64083_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int upd64083_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/i2c/vs6624.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ static int vs6624_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *r
return 0;
}

static int vs6624_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
static int vs6624_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);

Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/media/pci/bt8xx/bttv-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1945,7 +1945,7 @@ static int bttv_g_register(struct file *file, void *f,
}

static int bttv_s_register(struct file *file, void *f,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct bttv_fh *fh = f;
struct bttv *btv = fh->btv;
Expand All @@ -1961,8 +1961,7 @@ static int bttv_s_register(struct file *file, void *f,
}

/* bt848 has a 12-bit register space */
reg->reg &= 0xfff;
btwrite(reg->val, reg->reg);
btwrite(reg->val, reg->reg & 0xfff);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/pci/cx18/cx18-av-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ static int cx18_av_g_register(struct v4l2_subdev *sd,
}

static int cx18_av_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct cx18 *cx = v4l2_get_subdevdata(sd);

Expand Down
36 changes: 14 additions & 22 deletions trunk/drivers/media/pci/cx18/cx18-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,42 +415,34 @@ static int cx18_g_chip_ident(struct file *file, void *fh,
}

#ifdef CONFIG_VIDEO_ADV_DEBUG
static int cx18_cxc(struct cx18 *cx, unsigned int cmd, void *arg)
{
struct v4l2_dbg_register *regs = arg;

if (!capable(CAP_SYS_ADMIN))
return -EPERM;
if (regs->reg >= CX18_MEM_OFFSET + CX18_MEM_SIZE)
return -EINVAL;

regs->size = 4;
if (cmd == VIDIOC_DBG_S_REGISTER)
cx18_write_enc(cx, regs->val, regs->reg);
else
regs->val = cx18_read_enc(cx, regs->reg);
return 0;
}

static int cx18_g_register(struct file *file, void *fh,
struct v4l2_dbg_register *reg)
{
struct cx18 *cx = fh2id(fh)->cx;

if (v4l2_chip_match_host(&reg->match))
return cx18_cxc(cx, VIDIOC_DBG_G_REGISTER, reg);
if (v4l2_chip_match_host(&reg->match)) {
if (reg->reg >= CX18_MEM_OFFSET + CX18_MEM_SIZE)
return -EINVAL;
reg->size = 4;
reg->val = cx18_read_enc(cx, reg->reg);
return 0;
}
/* FIXME - errors shouldn't be ignored */
cx18_call_all(cx, core, g_register, reg);
return 0;
}

static int cx18_s_register(struct file *file, void *fh,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct cx18 *cx = fh2id(fh)->cx;

if (v4l2_chip_match_host(&reg->match))
return cx18_cxc(cx, VIDIOC_DBG_S_REGISTER, reg);
if (v4l2_chip_match_host(&reg->match)) {
if (reg->reg >= CX18_MEM_OFFSET + CX18_MEM_SIZE)
return -EINVAL;
cx18_write_enc(cx, reg->val, reg->reg);
return 0;
}
/* FIXME - errors shouldn't be ignored */
cx18_call_all(cx, core, s_register, reg);
return 0;
Expand Down
Loading

0 comments on commit 18b71a0

Please sign in to comment.