Skip to content

Commit

Permalink
media: saa7146: constify videobuf_queue_ops structures
Browse files Browse the repository at this point in the history
videobuf_queue_ops are not supposed to change at runtime. All functions
working with videobuf_queue_ops provided by <media/videobuf-core.h> work
with const videobuf_queue_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
  • Loading branch information
Arvind Yadav authored and Mauro Carvalho Chehab committed Aug 26, 2017
1 parent 597c147 commit 11c2078
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/media/common/saa7146/saa7146_vbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
saa7146_dma_free(dev,q,buf);
}

static struct videobuf_queue_ops vbi_qops = {
static const struct videobuf_queue_ops vbi_qops = {
.buf_setup = buffer_setup,
.buf_prepare = buffer_prepare,
.buf_queue = buffer_queue,
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/common/saa7146/saa7146_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
release_all_pagetables(dev, buf);
}

static struct videobuf_queue_ops video_qops = {
static const struct videobuf_queue_ops video_qops = {
.buf_setup = buffer_setup,
.buf_prepare = buffer_prepare,
.buf_queue = buffer_queue,
Expand Down

0 comments on commit 11c2078

Please sign in to comment.