usb: gadget: f_uvc: make uvc_v4l2_fops const
Subsystems (2)
PATCH 1/1 usb: gadget: f_uvc: make uvc_v4l2_fops const
Make this const as it is only stored in the const field of a structure video_device in the file referencing it. Make the declaration const too.
Done using Coccinelle.
Signed-off-by Bhumika Goyal <[email protected]>
--- drivers/usb/gadget/function/uvc_v4l2.c | 2 +- drivers/usb/gadget/function/uvc_v4l2.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/gadget/function/uvc_v4l2.c +1 -1
@@ -354,7 +354,7 @@ static unsigned long uvcg_v4l2_get_unmapped_area(struct file *file, }#endif -struct v4l2_file_operations uvc_v4l2_fops = { +const struct v4l2_file_operations uvc_v4l2_fops = { .owner =THIS_MODULE , .open = uvc_v4l2_open, .release = uvc_v4l2_release,
drivers/usb/gadget/function/uvc_v4l2.h +1 -1
@@ -17,6 +17,6 @@#define __UVC_V4L2_H__extern const struct v4l2_ioctl_ops uvc_v4l2_ioctl_ops; -extern struct v4l2_file_operations uvc_v4l2_fops; +extern const struct v4l2_file_operations uvc_v4l2_fops;#endif /* __UVC_V4L2_H__ */
Signature · 1 line
1.9.1