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

Commit ff05c984 authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Mauro Carvalho Chehab
Browse files

media: : usb: add const to v4l2_file_operations structures



Declare v4l2_file_operations structures as const as they are only stored
in the fops field of video_device structures. This field is of type
const, so declare v4l2_file_operations structures with similar properties
as const.

Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 488e27ad
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1740,7 +1740,7 @@ void au0828_v4l2_resume(struct au0828_dev *dev)
	}
}

static struct v4l2_file_operations au0828_v4l_fops = {
static const struct v4l2_file_operations au0828_v4l_fops = {
	.owner      = THIS_MODULE,
	.open       = au0828_v4l2_open,
	.release    = au0828_v4l2_close,
+1 −1
Original line number Diff line number Diff line
@@ -1843,7 +1843,7 @@ static int mpeg_mmap(struct file *file, struct vm_area_struct *vma)
	return videobuf_mmap_mapper(&fh->vidq, vma);
}

static struct v4l2_file_operations mpeg_fops = {
static const struct v4l2_file_operations mpeg_fops = {
	.owner	       = THIS_MODULE,
	.open	       = mpeg_open,
	.release       = mpeg_release,
+1 −1
Original line number Diff line number Diff line
@@ -857,7 +857,7 @@ static int go7007_s_ctrl(struct v4l2_ctrl *ctrl)
	return 0;
}

static struct v4l2_file_operations go7007_fops = {
static const struct v4l2_file_operations go7007_fops = {
	.owner		= THIS_MODULE,
	.open		= v4l2_fh_open,
	.release	= vb2_fop_release,
+1 −1
Original line number Diff line number Diff line
@@ -1964,7 +1964,7 @@ static ssize_t dev_read(struct file *file, char __user *data,
	return ret;
}

static struct v4l2_file_operations dev_fops = {
static const struct v4l2_file_operations dev_fops = {
	.owner = THIS_MODULE,
	.open = dev_open,
	.release = dev_close,
+1 −1
Original line number Diff line number Diff line
@@ -326,7 +326,7 @@ static int stk1160_stop_streaming(struct stk1160 *dev)
	return 0;
}

static struct v4l2_file_operations stk1160_fops = {
static const struct v4l2_file_operations stk1160_fops = {
	.owner = THIS_MODULE,
	.open = v4l2_fh_open,
	.release = vb2_fop_release,
Loading