mirror of https://gitee.com/openkylin/linux.git
media: usb: make video_device const
Make these const as they are only used during a copy operation. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Acked-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
507e190946
commit
8684494220
|
@ -859,7 +859,7 @@ static const struct v4l2_file_operations airspy_fops = {
|
||||||
.unlocked_ioctl = video_ioctl2,
|
.unlocked_ioctl = video_ioctl2,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct video_device airspy_template = {
|
static const struct video_device airspy_template = {
|
||||||
.name = "AirSpy SDR",
|
.name = "AirSpy SDR",
|
||||||
.release = video_device_release_empty,
|
.release = video_device_release_empty,
|
||||||
.fops = &airspy_fops,
|
.fops = &airspy_fops,
|
||||||
|
|
|
@ -1075,7 +1075,7 @@ static const struct v4l2_file_operations cpia2_fops = {
|
||||||
.mmap = cpia2_mmap,
|
.mmap = cpia2_mmap,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct video_device cpia2_template = {
|
static const struct video_device cpia2_template = {
|
||||||
/* I could not find any place for the old .initialize initializer?? */
|
/* I could not find any place for the old .initialize initializer?? */
|
||||||
.name = "CPiA2 Camera",
|
.name = "CPiA2 Camera",
|
||||||
.fops = &cpia2_fops,
|
.fops = &cpia2_fops,
|
||||||
|
|
|
@ -901,7 +901,7 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
|
||||||
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
|
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct video_device go7007_template = {
|
static const struct video_device go7007_template = {
|
||||||
.name = "go7007",
|
.name = "go7007",
|
||||||
.fops = &go7007_fops,
|
.fops = &go7007_fops,
|
||||||
.release = video_device_release_empty,
|
.release = video_device_release_empty,
|
||||||
|
|
|
@ -1263,7 +1263,7 @@ static const struct v4l2_file_operations hackrf_fops = {
|
||||||
.unlocked_ioctl = video_ioctl2,
|
.unlocked_ioctl = video_ioctl2,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct video_device hackrf_template = {
|
static const struct video_device hackrf_template = {
|
||||||
.name = "HackRF One",
|
.name = "HackRF One",
|
||||||
.release = video_device_release_empty,
|
.release = video_device_release_empty,
|
||||||
.fops = &hackrf_fops,
|
.fops = &hackrf_fops,
|
||||||
|
|
|
@ -1143,7 +1143,7 @@ static const struct v4l2_file_operations msi2500_fops = {
|
||||||
.unlocked_ioctl = video_ioctl2,
|
.unlocked_ioctl = video_ioctl2,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct video_device msi2500_template = {
|
static const struct video_device msi2500_template = {
|
||||||
.name = "Mirics MSi3101 SDR Dongle",
|
.name = "Mirics MSi3101 SDR Dongle",
|
||||||
.release = video_device_release_empty,
|
.release = video_device_release_empty,
|
||||||
.fops = &msi2500_fops,
|
.fops = &msi2500_fops,
|
||||||
|
|
|
@ -1226,7 +1226,7 @@ static const struct v4l2_file_operations vdev_fops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static struct video_device vdev_template = {
|
static const struct video_device vdev_template = {
|
||||||
.fops = &vdev_fops,
|
.fops = &vdev_fops,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ static const struct v4l2_file_operations pwc_fops = {
|
||||||
.mmap = vb2_fop_mmap,
|
.mmap = vb2_fop_mmap,
|
||||||
.unlocked_ioctl = video_ioctl2,
|
.unlocked_ioctl = video_ioctl2,
|
||||||
};
|
};
|
||||||
static struct video_device pwc_template = {
|
static const struct video_device pwc_template = {
|
||||||
.name = "Philips Webcam", /* Filled in later */
|
.name = "Philips Webcam", /* Filled in later */
|
||||||
.release = video_device_release_empty,
|
.release = video_device_release_empty,
|
||||||
.fops = &pwc_fops,
|
.fops = &pwc_fops,
|
||||||
|
|
|
@ -1590,7 +1590,7 @@ static void s2255_video_device_release(struct video_device *vdev)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct video_device template = {
|
static const struct video_device template = {
|
||||||
.name = "s2255v",
|
.name = "s2255v",
|
||||||
.fops = &s2255_fops_v4l,
|
.fops = &s2255_fops_v4l,
|
||||||
.ioctl_ops = &s2255_ioctl_ops,
|
.ioctl_ops = &s2255_ioctl_ops,
|
||||||
|
|
|
@ -751,7 +751,7 @@ static const struct vb2_ops stk1160_video_qops = {
|
||||||
.wait_finish = vb2_ops_wait_finish,
|
.wait_finish = vb2_ops_wait_finish,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct video_device v4l_template = {
|
static const struct video_device v4l_template = {
|
||||||
.name = "stk1160",
|
.name = "stk1160",
|
||||||
.tvnorms = V4L2_STD_525_60 | V4L2_STD_625_50,
|
.tvnorms = V4L2_STD_525_60 | V4L2_STD_625_50,
|
||||||
.fops = &stk1160_fops,
|
.fops = &stk1160_fops,
|
||||||
|
|
|
@ -1244,7 +1244,7 @@ static void stk_v4l_dev_release(struct video_device *vd)
|
||||||
kfree(dev);
|
kfree(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct video_device stk_v4l_data = {
|
static const struct video_device stk_v4l_data = {
|
||||||
.name = "stkwebcam",
|
.name = "stkwebcam",
|
||||||
.fops = &v4l_stk_fops,
|
.fops = &v4l_stk_fops,
|
||||||
.ioctl_ops = &v4l_stk_ioctl_ops,
|
.ioctl_ops = &v4l_stk_ioctl_ops,
|
||||||
|
|
|
@ -1335,7 +1335,7 @@ static const struct v4l2_ioctl_ops zr364xx_ioctl_ops = {
|
||||||
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
|
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct video_device zr364xx_template = {
|
static const struct video_device zr364xx_template = {
|
||||||
.name = DRIVER_DESC,
|
.name = DRIVER_DESC,
|
||||||
.fops = &zr364xx_fops,
|
.fops = &zr364xx_fops,
|
||||||
.ioctl_ops = &zr364xx_ioctl_ops,
|
.ioctl_ops = &zr364xx_ioctl_ops,
|
||||||
|
|
Loading…
Reference in New Issue