]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: usb: make video_device const
authorBhumika Goyal <bhumirks@gmail.com>
Sat, 26 Aug 2017 13:11:30 +0000 (09:11 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 27 Aug 2017 12:45:32 +0000 (08:45 -0400)
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>
drivers/media/usb/airspy/airspy.c
drivers/media/usb/cpia2/cpia2_v4l.c
drivers/media/usb/go7007/go7007-v4l2.c
drivers/media/usb/hackrf/hackrf.c
drivers/media/usb/msi2500/msi2500.c
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
drivers/media/usb/pwc/pwc-if.c
drivers/media/usb/s2255/s2255drv.c
drivers/media/usb/stk1160/stk1160-v4l.c
drivers/media/usb/stkwebcam/stk-webcam.c
drivers/media/usb/zr364xx/zr364xx.c

index 07f3f4e7144acfe4180f25a2e2c35074db2c2df6..e70c9e2f3798de12a3f75b2bef86dc007e5170ad 100644 (file)
@@ -859,7 +859,7 @@ static const struct v4l2_file_operations airspy_fops = {
        .unlocked_ioctl           = video_ioctl2,
 };
 
-static struct video_device airspy_template = {
+static const struct video_device airspy_template = {
        .name                     = "AirSpy SDR",
        .release                  = video_device_release_empty,
        .fops                     = &airspy_fops,
index 7122023e7004995a5cd8912b4b77175b695acb11..3dedd83f0b19f91240a1602a7591df3d989e14a8 100644 (file)
@@ -1075,7 +1075,7 @@ static const struct v4l2_file_operations cpia2_fops = {
        .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?? */
        .name =         "CPiA2 Camera",
        .fops =         &cpia2_fops,
index 445f17b850c5178317615722a2f42bf38ab3bd0d..98cd57eaf36a4d1923a993f7a6b75728cfa0f25e 100644 (file)
@@ -901,7 +901,7 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
        .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };
 
-static struct video_device go7007_template = {
+static const struct video_device go7007_template = {
        .name           = "go7007",
        .fops           = &go7007_fops,
        .release        = video_device_release_empty,
index a41b305c55d4454aa178619493ba36cb0324ed0f..7eb53517a82f2669235d2c983a7723148b3f1a17 100644 (file)
@@ -1263,7 +1263,7 @@ static const struct v4l2_file_operations hackrf_fops = {
        .unlocked_ioctl           = video_ioctl2,
 };
 
-static struct video_device hackrf_template = {
+static const struct video_device hackrf_template = {
        .name                     = "HackRF One",
        .release                  = video_device_release_empty,
        .fops                     = &hackrf_fops,
index 79bfd2dbe649805dc126d5962f1c9a5683555348..a097d3dbc141ff6475de46f78a2f323e217cf273 100644 (file)
@@ -1143,7 +1143,7 @@ static const struct v4l2_file_operations msi2500_fops = {
        .unlocked_ioctl           = video_ioctl2,
 };
 
-static struct video_device msi2500_template = {
+static const struct video_device msi2500_template = {
        .name                     = "Mirics MSi3101 SDR Dongle",
        .release                  = video_device_release_empty,
        .fops                     = &msi2500_fops,
index 8f13c60198ed64d72dc74ebf56eacb28714aba86..4320bda9352df905592921e4522c61349176a954 100644 (file)
@@ -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,
 };
 
index 22420c14ac98d96c2868229343688163dbbae4f4..eb6921d2743ee848b4332f75c86b524bb30f96fb 100644 (file)
@@ -146,7 +146,7 @@ static const struct v4l2_file_operations pwc_fops = {
        .mmap =         vb2_fop_mmap,
        .unlocked_ioctl = video_ioctl2,
 };
-static struct video_device pwc_template = {
+static const struct video_device pwc_template = {
        .name =         "Philips Webcam",       /* Filled in later */
        .release =      video_device_release_empty,
        .fops =         &pwc_fops,
index 23f606e7cd73f822c7168ce0756949b618470a23..b2f239c4ba4267656d760138e485d0ddf42f71d1 100644 (file)
@@ -1590,7 +1590,7 @@ static void s2255_video_device_release(struct video_device *vdev)
        return;
 }
 
-static struct video_device template = {
+static const struct video_device template = {
        .name = "s2255v",
        .fops = &s2255_fops_v4l,
        .ioctl_ops = &s2255_ioctl_ops,
index a132faa590df7b083eb3ed78161fc3a50bb2b57a..77b759a0bcd9cbf2d7042f06ceb57b9299fcacac 100644 (file)
@@ -751,7 +751,7 @@ static const struct vb2_ops stk1160_video_qops = {
        .wait_finish            = vb2_ops_wait_finish,
 };
 
-static struct video_device v4l_template = {
+static const struct video_device v4l_template = {
        .name = "stk1160",
        .tvnorms = V4L2_STD_525_60 | V4L2_STD_625_50,
        .fops = &stk1160_fops,
index 39abb58c65dd99a71e362f6d688323e9ade9bd46..c0bba773db25b0032bfb3f422117c6d08de5e382 100644 (file)
@@ -1244,7 +1244,7 @@ static void stk_v4l_dev_release(struct video_device *vd)
        kfree(dev);
 }
 
-static struct video_device stk_v4l_data = {
+static const struct video_device stk_v4l_data = {
        .name = "stkwebcam",
        .fops = &v4l_stk_fops,
        .ioctl_ops = &v4l_stk_ioctl_ops,
index d4bb56baad9be13527157d4ca292c326101f1a25..4ff8d0aed015ce992e1b1f25dcac605153fafb6f 100644 (file)
@@ -1335,7 +1335,7 @@ static const struct v4l2_ioctl_ops zr364xx_ioctl_ops = {
        .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };
 
-static struct video_device zr364xx_template = {
+static const struct video_device zr364xx_template = {
        .name = DRIVER_DESC,
        .fops = &zr364xx_fops,
        .ioctl_ops = &zr364xx_ioctl_ops,