Skip to contentSkip to conversation

cx23885: add const to v4l2_file_operations structure

PATCH New Bhumika Goyal 1 participant 1 message Jun 29, 2017 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cx23885: add const to v4l2_file_operations structure

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

---
 drivers/media/pci/cx23885/cx23885-417.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/cx23885/cx23885-417.c +1 -1
index 2ff1d1e..a71f3c7 100644
@@ -1416,7 +1416,7 @@ static int vidioc_log_status(struct file *file, void *priv)
 	return 0;
 }
 
-static struct v4l2_file_operations mpeg_fops = {
+static const struct v4l2_file_operations mpeg_fops = {
 	.owner	       = THIS_MODULE,
 	.open           = v4l2_fh_open,
 	.release        = vb2_fop_release,
Signature · 1 line
2.7.4