Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6eb28c2 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] v4l2: make vidioc_s_fbuf const



Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_fbuf.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 06fce286
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -479,7 +479,7 @@ static int vidioc_g_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *f
	return 0;
	return 0;
}
}


static int vidioc_s_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *fb)
static int vidioc_s_fbuf(struct file *file, void *fh, const struct v4l2_framebuffer *fb)
{
{
	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
	struct saa7146_vv *vv = dev->vv_data;
	struct saa7146_vv *vv = dev->vv_data;
+1 −1
Original line number Original line Diff line number Diff line
@@ -2740,7 +2740,7 @@ static int bttv_overlay(struct file *file, void *f, unsigned int on)
}
}


static int bttv_s_fbuf(struct file *file, void *f,
static int bttv_s_fbuf(struct file *file, void *f,
				struct v4l2_framebuffer *fb)
				const struct v4l2_framebuffer *fb)
{
{
	struct bttv_fh *fh = f;
	struct bttv_fh *fh = f;
	struct bttv *btv = fh->btv;
	struct bttv *btv = fh->btv;
+2 −2
Original line number Original line Diff line number Diff line
@@ -1427,7 +1427,7 @@ static int ivtv_g_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *fb)
	return 0;
	return 0;
}
}


static int ivtv_s_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *fb)
static int ivtv_s_fbuf(struct file *file, void *fh, const struct v4l2_framebuffer *fb)
{
{
	struct ivtv_open_id *id = fh2id(fh);
	struct ivtv_open_id *id = fh2id(fh);
	struct ivtv *itv = id->itv;
	struct ivtv *itv = id->itv;
@@ -1444,7 +1444,7 @@ static int ivtv_s_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *fb)
	itv->osd_chroma_key_state = (fb->flags & V4L2_FBUF_FLAG_CHROMAKEY) != 0;
	itv->osd_chroma_key_state = (fb->flags & V4L2_FBUF_FLAG_CHROMAKEY) != 0;
	ivtv_set_osd_alpha(itv);
	ivtv_set_osd_alpha(itv);
	yi->track_osd = (fb->flags & V4L2_FBUF_FLAG_OVERLAY) != 0;
	yi->track_osd = (fb->flags & V4L2_FBUF_FLAG_OVERLAY) != 0;
	return ivtv_g_fbuf(file, fh, fb);
	return 0;
}
}


static int ivtv_overlay(struct file *file, void *fh, unsigned int on)
static int ivtv_overlay(struct file *file, void *fh, unsigned int on)
+1 −1
Original line number Original line Diff line number Diff line
@@ -2158,7 +2158,7 @@ static int saa7134_g_fbuf(struct file *file, void *f,
}
}


static int saa7134_s_fbuf(struct file *file, void *f,
static int saa7134_s_fbuf(struct file *file, void *f,
					struct v4l2_framebuffer *fb)
					const struct v4l2_framebuffer *fb)
{
{
	struct saa7134_fh *fh = f;
	struct saa7134_fh *fh = f;
	struct saa7134_dev *dev = fh->dev;
	struct saa7134_dev *dev = fh->dev;
+1 −1
Original line number Original line Diff line number Diff line
@@ -1978,7 +1978,7 @@ static int zoran_g_fbuf(struct file *file, void *__fh,
}
}


static int zoran_s_fbuf(struct file *file, void *__fh,
static int zoran_s_fbuf(struct file *file, void *__fh,
		struct v4l2_framebuffer *fb)
		const struct v4l2_framebuffer *fb)
{
{
	struct zoran_fh *fh = __fh;
	struct zoran_fh *fh = __fh;
	struct zoran *zr = fh->zr;
	struct zoran *zr = fh->zr;
Loading