[media] v4l2: add const to argument of write-only s_register ioctl

This ioctl is defined as IOW, so pass the argument as const.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Hans Verkuil 2013-03-24 08:28:46 -03:00 committed by Mauro Carvalho Chehab
parent b5656e8b73
commit 977ba3b1b7
69 changed files with 96 additions and 102 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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;
@ -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;
}

View File

@ -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);

View File

@ -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;

View File

@ -158,18 +158,17 @@ int cx23885_g_register(struct file *file, void *fh,
}
static int cx23885_s_host_register(struct cx23885_dev *dev,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
if ((reg->reg & 0x3) != 0 || reg->reg >= pci_resource_len(dev->pci, 0))
return -EINVAL;
reg->size = 4;
cx_write(reg->reg, reg->val);
return 0;
}
static int cx23417_s_register(struct cx23885_dev *dev,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
if (dev->v4l_device == NULL)
return -EINVAL;
@ -179,13 +178,11 @@ static int cx23417_s_register(struct cx23885_dev *dev,
if (mc417_register_write(dev, (u16) reg->reg, (u32) reg->val))
return -EINVAL; /* V4L2 spec, but -EREMOTEIO really */
reg->size = 4;
return 0;
}
int cx23885_s_register(struct file *file, void *fh,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct cx23885_dev *dev = ((struct cx23885_fh *)fh)->dev;

View File

@ -33,7 +33,7 @@ int cx23885_g_register(struct file *file, void *fh,
int cx23885_s_register(struct file *file, void *fh,
struct v4l2_dbg_register *reg);
const struct v4l2_dbg_register *reg);
#endif
#endif

View File

@ -1124,7 +1124,7 @@ static int cx23888_ir_g_register(struct v4l2_subdev *sd,
}
static int cx23888_ir_s_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct cx23888_ir_state *state = to_state(sd);
u32 addr = CX23888_IR_REG_BASE + (u32) reg->reg;

View File

@ -1364,7 +1364,7 @@ int cx25821_vidioc_g_register(struct file *file, void *fh,
}
int cx25821_vidioc_s_register(struct file *file, void *fh,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct cx25821_dev *dev = ((struct cx25821_fh *)fh)->dev;

View File

@ -155,7 +155,7 @@ extern int cx25821_vidioc_s_frequency(struct file *file, void *priv,
extern int cx25821_vidioc_g_register(struct file *file, void *fh,
struct v4l2_dbg_register *reg);
extern int cx25821_vidioc_s_register(struct file *file, void *fh,
struct v4l2_dbg_register *reg);
const struct v4l2_dbg_register *reg);
extern int cx25821_vidioc_g_tuner(struct file *file, void *priv,
struct v4l2_tuner *t);
extern int cx25821_vidioc_s_tuner(struct file *file, void *priv,

View File

@ -1380,7 +1380,7 @@ static int vidioc_g_register (struct file *file, void *fh,
}
static int vidioc_s_register (struct file *file, void *fh,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core;

View File

@ -748,12 +748,15 @@ static int ivtv_g_register(struct file *file, void *fh, struct v4l2_dbg_register
return 0;
}
static int ivtv_s_register(struct file *file, void *fh, struct v4l2_dbg_register *reg)
static int ivtv_s_register(struct file *file, void *fh, const struct v4l2_dbg_register *reg)
{
struct ivtv *itv = fh2id(fh)->itv;
if (v4l2_chip_match_host(&reg->match))
return ivtv_itvc(itv, false, reg->reg, &reg->val);
if (v4l2_chip_match_host(&reg->match)) {
u64 val = reg->val;
return ivtv_itvc(itv, false, reg->reg, &val);
}
/* TODO: subdev errors should not be ignored, this should become a
subdev helper function. */
ivtv_call_all(itv, core, s_register, reg);

View File

@ -2300,7 +2300,7 @@ static int vidioc_g_register (struct file *file, void *priv,
}
static int vidioc_s_register (struct file *file, void *priv,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct saa7134_fh *fh = priv;
struct saa7134_dev *dev = fh->dev;

View File

@ -680,7 +680,7 @@ static int vidioc_g_register(struct file *file, void *fh, struct v4l2_dbg_regist
return 0;
}
static int vidioc_s_register(struct file *file, void *fh, struct v4l2_dbg_register *reg)
static int vidioc_s_register(struct file *file, void *fh, const struct v4l2_dbg_register *reg)
{
struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
@ -688,7 +688,6 @@ static int vidioc_s_register(struct file *file, void *fh, struct v4l2_dbg_regist
return -EPERM;
if (v4l2_chip_match_host(&reg->match)) {
saa7146_write(dev, reg->reg, reg->val);
reg->size = 4;
return 0;
}
return call_all(dev, core, s_register, reg);

View File

@ -1313,7 +1313,7 @@ static int saa7164_g_register(struct file *file, void *fh,
}
static int saa7164_s_register(struct file *file, void *fh,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct saa7164_port *port = ((struct saa7164_encoder_fh *)fh)->port;
struct saa7164_dev *dev = port->dev;

View File

@ -890,7 +890,7 @@ static int bcap_dbg_g_register(struct file *file, void *priv,
}
static int bcap_dbg_s_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct bcap_device *bcap_dev = video_drvdata(file);

View File

@ -1597,7 +1597,7 @@ static int vpbe_display_g_register(struct file *file, void *priv,
}
static int vpbe_display_s_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
return 0;
}

View File

@ -1924,7 +1924,8 @@ static int vpif_dbg_g_register(struct file *file, void *priv,
* Returns zero or -EINVAL if write operations fails.
*/
static int vpif_dbg_s_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg){
const struct v4l2_dbg_register *reg)
{
struct vpif_fh *fh = priv;
struct channel_obj *ch = fh->channel;

View File

@ -1568,7 +1568,8 @@ static int vpif_dbg_g_register(struct file *file, void *priv,
* Returns zero or -EINVAL if write operations fails.
*/
static int vpif_dbg_s_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg){
const struct v4l2_dbg_register *reg)
{
struct vpif_fh *fh = priv;
struct channel_obj *ch = fh->channel;

View File

@ -1445,7 +1445,7 @@ static int mcam_vidioc_g_register(struct file *file, void *priv,
}
static int mcam_vidioc_s_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct mcam_camera *cam = priv;

View File

@ -1266,7 +1266,7 @@ static int sh_vou_g_register(struct file *file, void *fh,
}
static int sh_vou_s_register(struct file *file, void *fh,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct sh_vou_device *vou_dev = video_drvdata(file);

View File

@ -1042,7 +1042,7 @@ static int soc_camera_g_register(struct file *file, void *fh,
}
static int soc_camera_s_register(struct file *file, void *fh,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct soc_camera_device *icd = file->private_data;
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);

View File

@ -1754,7 +1754,7 @@ static int vidioc_g_register(struct file *file, void *priv,
}
static int vidioc_s_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct au0828_fh *fh = priv;
struct au0828_dev *dev = fh->dev;

View File

@ -1404,7 +1404,7 @@ int cx231xx_g_register(struct file *file, void *priv,
}
int cx231xx_s_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct cx231xx_fh *fh = priv;
struct cx231xx *dev = fh->dev;

View File

@ -949,7 +949,7 @@ int cx231xx_g_chip_ident(struct file *file, void *fh, struct v4l2_dbg_chip_ident
int cx231xx_g_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg);
int cx231xx_s_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg);
const struct v4l2_dbg_register *reg);
/* Provided by cx231xx-cards.c */
extern void cx231xx_pre_card_setup(struct cx231xx *dev);

View File

@ -1323,7 +1323,7 @@ static int vidioc_g_register(struct file *file, void *priv,
}
static int vidioc_s_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct em28xx_fh *fh = priv;
struct em28xx *dev = fh->dev;

View File

@ -1039,7 +1039,7 @@ static int vidioc_g_register(struct file *file, void *priv,
}
static int vidioc_s_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct gspca_dev *gspca_dev = video_drvdata(file);

View File

@ -74,8 +74,10 @@ typedef int (*cam_get_jpg_op) (struct gspca_dev *,
struct v4l2_jpegcompression *);
typedef int (*cam_set_jpg_op) (struct gspca_dev *,
const struct v4l2_jpegcompression *);
typedef int (*cam_reg_op) (struct gspca_dev *,
typedef int (*cam_get_reg_op) (struct gspca_dev *,
struct v4l2_dbg_register *);
typedef int (*cam_set_reg_op) (struct gspca_dev *,
const struct v4l2_dbg_register *);
typedef int (*cam_ident_op) (struct gspca_dev *,
struct v4l2_dbg_chip_ident *);
typedef void (*cam_streamparm_op) (struct gspca_dev *,
@ -108,8 +110,8 @@ struct sd_desc {
cam_streamparm_op get_streamparm;
cam_streamparm_op set_streamparm;
#ifdef CONFIG_VIDEO_ADV_DEBUG
cam_reg_op set_register;
cam_reg_op get_register;
cam_set_reg_op set_register;
cam_get_reg_op get_register;
#endif
cam_ident_op get_chip_ident;
#if IS_ENABLED(CONFIG_INPUT)

View File

@ -840,7 +840,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
#ifdef CONFIG_VIDEO_ADV_DEBUG
static int sd_dbg_s_register(struct gspca_dev *gspca_dev,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
u8 index;
u8 value;

View File

@ -1598,7 +1598,7 @@ static int sd_dbg_g_register(struct gspca_dev *gspca_dev,
}
static int sd_dbg_s_register(struct gspca_dev *gspca_dev,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct sd *sd = (struct sd *) gspca_dev;

View File

@ -5165,7 +5165,7 @@ static int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw)
int pvr2_hdw_register_access(struct pvr2_hdw *hdw,
struct v4l2_dbg_match *match, u64 reg_id,
const struct v4l2_dbg_match *match, u64 reg_id,
int setFl, u64 *val_ptr)
{
#ifdef CONFIG_VIDEO_ADV_DEBUG

View File

@ -240,7 +240,7 @@ void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *,
setFl - true to set the register, false to read it
val_ptr - storage location for source / result. */
int pvr2_hdw_register_access(struct pvr2_hdw *,
struct v4l2_dbg_match *match, u64 reg_id,
const struct v4l2_dbg_match *match, u64 reg_id,
int setFl, u64 *val_ptr);
/* The following entry points are all lower level things you normally don't

View File

@ -815,7 +815,7 @@ static int pvr2_g_register(struct file *file, void *priv, struct v4l2_dbg_regist
return ret;
}
static int pvr2_s_register(struct file *file, void *priv, struct v4l2_dbg_register *req)
static int pvr2_s_register(struct file *file, void *priv, const struct v4l2_dbg_register *req)
{
struct pvr2_v4l2_fh *fh = file->private_data;
struct pvr2_hdw *hdw = fh->channel.mc_head->hdw;

View File

@ -500,7 +500,7 @@ static int vidioc_g_register(struct file *file, void *priv,
}
static int vidioc_s_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct stk1160 *dev = video_drvdata(file);

View File

@ -483,7 +483,7 @@ static int vidioc_g_register(struct file *file, void *priv,
}
static int vidioc_s_register(struct file *file, void *priv,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{
struct usb_usbvision *usbvision = video_drvdata(file);
int err_code;

View File

@ -1813,7 +1813,7 @@ static int v4l_dbg_s_register(const struct v4l2_ioctl_ops *ops,
struct file *file, void *fh, void *arg)
{
#ifdef CONFIG_VIDEO_ADV_DEBUG
struct v4l2_dbg_register *p = arg;
const struct v4l2_dbg_register *p = arg;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;

View File

@ -242,7 +242,7 @@ struct v4l2_ioctl_ops {
int (*vidioc_g_register) (struct file *file, void *fh,
struct v4l2_dbg_register *reg);
int (*vidioc_s_register) (struct file *file, void *fh,
struct v4l2_dbg_register *reg);
const struct v4l2_dbg_register *reg);
#endif
int (*vidioc_g_chip_ident) (struct file *file, void *fh,
struct v4l2_dbg_chip_ident *chip);

View File

@ -165,7 +165,7 @@ struct v4l2_subdev_core_ops {
long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg);
#ifdef CONFIG_VIDEO_ADV_DEBUG
int (*g_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg);
int (*s_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg);
int (*s_register)(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg);
#endif
int (*s_power)(struct v4l2_subdev *sd, int on);
int (*interrupt_service_routine)(struct v4l2_subdev *sd,