Commit d2ae63c2 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Hans Verkuil

media: cx231xx: Constify struct vb2_ops

"struct vb2_ops" are not modified in this driver.

Constifying this structure moves some data to a read-only section, so
increase overall security.

On a x86_64, with allmodconfig:
Before:
======
   text	   data	    bss	    dec	    hex	filename
  36607	   1156	      0	  37763	   9383	drivers/media/usb/cx231xx/cx231xx-417.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
  36735	   1016	      0	  37751	   9377	drivers/media/usb/cx231xx/cx231xx-417.o
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 68594cec
......@@ -1453,7 +1453,7 @@ static void stop_streaming(struct vb2_queue *vq)
return_all_buffers(dev, VB2_BUF_STATE_ERROR);
}
static struct vb2_ops cx231xx_video_qops = {
static const struct vb2_ops cx231xx_video_qops = {
.queue_setup = queue_setup,
.buf_queue = buffer_queue,
.start_streaming = start_streaming,
......
......@@ -795,7 +795,7 @@ static void stop_streaming(struct vb2_queue *vq)
return_all_buffers(dev, VB2_BUF_STATE_ERROR);
}
static struct vb2_ops cx231xx_video_qops = {
static const struct vb2_ops cx231xx_video_qops = {
.queue_setup = queue_setup,
.buf_queue = buffer_queue,
.start_streaming = start_streaming,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment