Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1677538 > unrolled thread

[PATCH] [media] cx23885: add const to v4l2_file_operations structure

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-06-29 11:10 +0200
Last post2017-06-29 11:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] [media] cx23885: add const to v4l2_file_operations structure Bhumika Goyal <bhumirks@gmail.com> - 2017-06-29 11:10 +0200

#1677538 — [PATCH] [media] cx23885: add const to v4l2_file_operations structure

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-06-29 11:10 +0200
Subject[PATCH] [media] cx23885: add const to v4l2_file_operations structure
Message-ID<tXDCx-5Ff-11@gated-at.bofh.it>
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.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/media/pci/cx23885/cx23885-417.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c
index 2ff1d1e..a71f3c7 100644
--- a/drivers/media/pci/cx23885/cx23885-417.c
+++ b/drivers/media/pci/cx23885/cx23885-417.c
@@ -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,
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web