Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: gadget: uvc: constify vb2_ops structure

The vb2_ops structure can be const as it is only stored in the ops
field of a vb2_queue structure and this field is const.

Done with the help of Coccinelle.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>

authored by

Julia Lawall and committed by
Felipe Balbi
e8942838 9aed8c08

+1 -1
+1 -1
drivers/usb/gadget/function/uvc_queue.c
··· 102 102 spin_unlock_irqrestore(&queue->irqlock, flags); 103 103 } 104 104 105 - static struct vb2_ops uvc_queue_qops = { 105 + static const struct vb2_ops uvc_queue_qops = { 106 106 .queue_setup = uvc_queue_setup, 107 107 .buf_prepare = uvc_buffer_prepare, 108 108 .buf_queue = uvc_buffer_queue,