Skip to contentSkip to conversation

platform: make video_device const

PATCH In review Bhumika Goyal 2 participants 14 messages Aug 26, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover platform: make video_device const

Make make video_device const.

Bhumika Goyal (10):
[media] cx88: make video_device const [media] dt3155: make video_device const [media]: marvell-ccic: make video_device const [media] mx2-emmaprp: make video_device const [media]: s5p-g2d: make video_device const [media]: ti-vpe: make video_device const [media] via-camera: make video_device const [media]: fsl-viu: make video_device const [media] m2m-deinterlace: make video_device const [media] vim2m: make video_device const

 drivers/media/pci/cx88/cx88-blackbird.c         | 2 +-
 drivers/media/pci/dt3155/dt3155.c               | 2 +-
 drivers/media/platform/fsl-viu.c                | 2 +-
 drivers/media/platform/m2m-deinterlace.c        | 2 +-
 drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
 drivers/media/platform/mx2_emmaprp.c            | 2 +-
 drivers/media/platform/s5p-g2d/g2d.c            | 2 +-
 drivers/media/platform/ti-vpe/cal.c             | 2 +-
 drivers/media/platform/ti-vpe/vpe.c             | 2 +-
 drivers/media/platform/via-camera.c             | 2 +-
 drivers/media/platform/vim2m.c                  | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/10 cx88: make video_device const

Make this const as it is only passed to the const argument of the function cx88_vdev_init.

---
 drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/cx88/cx88-blackbird.c +1 -1
index aa49c95..e3101f0 100644
@@ -1075,7 +1075,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id id)
 	.vidioc_unsubscribe_event    = v4l2_event_unsubscribe,
 };
 
-static struct video_device cx8802_mpeg_template = {
+static const struct video_device cx8802_mpeg_template = {
 	.name                 = "cx8802",
 	.fops                 = &mpeg_fops,
 	.ioctl_ops	      = &mpeg_ioctl_ops,
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/10 dt3155: make video_device const

In reply to Bhumika Goyal

Make this const as it is only used in a copy operation.

---
 drivers/media/pci/dt3155/dt3155.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/dt3155/dt3155.c +1 -1
index 6a21969..1775c36 100644
@@ -499,7 +499,7 @@ static int dt3155_init_board(struct dt3155_priv *pd)
 	return 0;
 }
 
-static struct video_device dt3155_vdev = {
+static const struct video_device dt3155_vdev = {
 	.name = DT3155_NAME,
 	.fops = &dt3155_fops,
 	.ioctl_ops = &dt3155_ioctl_ops,
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/10 : marvell-ccic: make video_device const

In reply to Bhumika Goyal

Make this const as it is only used in a copy operation.

---
 drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/marvell-ccic/mcam-core.c +1 -1
index 8cac2f2..b07a251 100644
@@ -1639,7 +1639,7 @@ static int mcam_v4l_release(struct file *filp)
  * This template device holds all of those v4l2 methods; we
  * clone it for specific real devices.
  */
-static struct video_device mcam_v4l_template = {
+static const struct video_device mcam_v4l_template = {
 	.name = "mcam",
 	.fops = &mcam_v4l_fops,
 	.ioctl_ops = &mcam_v4l_ioctl_ops,
Signature · 1 line
1.9.1
#4 lore raw

PATCH 4/10 mx2-emmaprp: make video_device const

In reply to Bhumika Goyal

Make this const as it is only used in a copy operation.

---
 drivers/media/platform/mx2_emmaprp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/mx2_emmaprp.c +1 -1
index 7fd209e..3493d40 100644
@@ -873,7 +873,7 @@ static int emmaprp_mmap(struct file *file, struct vm_area_struct *vma)
 	.mmap		= emmaprp_mmap,
 };
 
-static struct video_device emmaprp_videodev = {
+static const struct video_device emmaprp_videodev = {
 	.name		= MEM2MEM_NAME,
 	.fops		= &emmaprp_fops,
 	.ioctl_ops	= &emmaprp_ioctl_ops,
Signature · 1 line
1.9.1
#5 lore raw

PATCH 5/10 : s5p-g2d: make video_device const

In reply to Bhumika Goyal

Make this const as it is only used in a copy operation.

---
 drivers/media/platform/s5p-g2d/g2d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/s5p-g2d/g2d.c +1 -1
index bd655b5..66aa8cf 100644
@@ -602,7 +602,7 @@ static irqreturn_t g2d_isr(int irq, void *prv)
 	.vidioc_cropcap			= vidioc_cropcap,
 };
 
-static struct video_device g2d_videodev = {
+static const struct video_device g2d_videodev = {
 	.name		= G2D_NAME,
 	.fops		= &g2d_fops,
 	.ioctl_ops	= &g2d_ioctl_ops,
Signature · 1 line
1.9.1
#6 lore raw

PATCH 6/10 : ti-vpe: make video_device const

In reply to Bhumika Goyal

Make this const as it is only used in a copy operation.

---
 drivers/media/platform/ti-vpe/cal.c | 2 +-
 drivers/media/platform/ti-vpe/vpe.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/ti-vpe/cal.c +1 -1
index 0c7ddf8..42e383a 100644
@@ -1420,7 +1420,7 @@ static void cal_stop_streaming(struct vb2_queue *vq)
 	.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };
 
-static struct video_device cal_videodev = {
+static const struct video_device cal_videodev = {
 	.name		= CAL_MODULE_NAME,
 	.fops		= &cal_fops,
 	.ioctl_ops	= &cal_ioctl_ops,
drivers/media/platform/ti-vpe/vpe.c +1 -1
index 2873c22..45bd105 100644
@@ -2421,7 +2421,7 @@ static int vpe_release(struct file *file)
 	.mmap		= v4l2_m2m_fop_mmap,
 };
 
-static struct video_device vpe_videodev = {
+static const struct video_device vpe_videodev = {
 	.name		= VPE_MODULE_NAME,
 	.fops		= &vpe_fops,
 	.ioctl_ops	= &vpe_ioctl_ops,
Signature · 1 line
1.9.1
#7 lore raw

PATCH 7/10 via-camera: make video_device const

In reply to Bhumika Goyal

Make this const as it is only used in a copy operation.

---
 drivers/media/platform/via-camera.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/via-camera.c +1 -1
index e16f70a..805d4a8 100644
@@ -1259,7 +1259,7 @@ static int viacam_resume(void *priv)
  * Setup stuff.
  */
 
-static struct video_device viacam_v4l_template = {
+static const struct video_device viacam_v4l_template = {
 	.name		= "via-camera",
 	.minor		= -1,
 	.tvnorms	= V4L2_STD_NTSC_M,
Signature · 1 line
1.9.1
#8 lore raw

PATCH 8/10 : fsl-viu: make video_device const

In reply to Bhumika Goyal

Make this const as it is only used in a copy operation.

---
 drivers/media/platform/fsl-viu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/fsl-viu.c +1 -1
index f7b88e5..b3b91cb 100644
@@ -1380,7 +1380,7 @@ static int viu_mmap(struct file *file, struct vm_area_struct *vma)
 	.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };
 
-static struct video_device viu_template = {
+static const struct video_device viu_template = {
 	.name		= "FSL viu",
 	.fops		= &viu_fops,
 	.minor		= -1,
Signature · 1 line
1.9.1
#9 lore raw

PATCH 9/10 m2m-deinterlace: make video_device const

In reply to Bhumika Goyal

Make this const as it is only used in a copy operation.

---
 drivers/media/platform/m2m-deinterlace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/m2m-deinterlace.c +1 -1
index 98f6db2..c8a1249 100644
@@ -979,7 +979,7 @@ static int deinterlace_mmap(struct file *file, struct vm_area_struct *vma)
 	.mmap		= deinterlace_mmap,
 };
 
-static struct video_device deinterlace_videodev = {
+static const struct video_device deinterlace_videodev = {
 	.name		= MEM2MEM_NAME,
 	.fops		= &deinterlace_fops,
 	.ioctl_ops	= &deinterlace_ioctl_ops,
Signature · 1 line
1.9.1
#10 lore raw

PATCH 10/10 vim2m: make video_device const

In reply to Bhumika Goyal

Make this const as it is only used in a copy operation.

---
 drivers/media/platform/vim2m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/vim2m.c +1 -1
index afbaa35..b01fba0 100644
@@ -974,7 +974,7 @@ static int vim2m_release(struct file *file)
 	.mmap		= v4l2_m2m_fop_mmap,
 };
 
-static struct video_device vim2m_videodev = {
+static const struct video_device vim2m_videodev = {
 	.name		= MEM2MEM_NAME,
 	.vfl_dir	= VFL_DIR_M2M,
 	.fops		= &vim2m_fops,
Signature · 1 line
1.9.1
#11 lore raw
In reply to Bhumika Goyal

Em Sat, 26 Aug 2017 15:50:02 +0530
Bhumika Goyal <[email protected]> escreveu:

Quoted 14 lines

Make make video_device const.

Bhumika Goyal (10):
[media] cx88: make video_device const [media] dt3155: make video_device const [media]: marvell-ccic: make video_device const [media] mx2-emmaprp: make video_device const [media]: s5p-g2d: make video_device const [media]: ti-vpe: make video_device const [media] via-camera: make video_device const [media]: fsl-viu: make video_device const [media] m2m-deinterlace: make video_device const [media] vim2m: make video_device const

Quoted 11 lines
 drivers/media/pci/cx88/cx88-blackbird.c         | 2 +-
 drivers/media/pci/dt3155/dt3155.c               | 2 +-
 drivers/media/platform/fsl-viu.c                | 2 +-
 drivers/media/platform/m2m-deinterlace.c        | 2 +-
 drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
 drivers/media/platform/mx2_emmaprp.c            | 2 +-
 drivers/media/platform/s5p-g2d/g2d.c            | 2 +-
 drivers/media/platform/ti-vpe/cal.c             | 2 +-
 drivers/media/platform/ti-vpe/vpe.c             | 2 +-
 drivers/media/platform/via-camera.c             | 2 +-
 drivers/media/platform/vim2m.c                  | 2 +-

Please, don't do one such cleanup patch per file. Instead, group it per subdirectory, e. g. on e patch for:
drivers/media/platform/

and another one for:
drivers/media/pci/

That makes a lot easier to review and apply.

Thanks,
Mauro

#12 lore raw
Quoted 29 lines · Mauro Carvalho Chehab

Em Sat, 26 Aug 2017 15:50:02 +0530
Bhumika Goyal <[email protected]> escreveu:

Quoted 14 lines

Make make video_device const.

Bhumika Goyal (10):
[media] cx88: make video_device const [media] dt3155: make video_device const [media]: marvell-ccic: make video_device const [media] mx2-emmaprp: make video_device const [media]: s5p-g2d: make video_device const [media]: ti-vpe: make video_device const [media] via-camera: make video_device const [media]: fsl-viu: make video_device const [media] m2m-deinterlace: make video_device const [media] vim2m: make video_device const

Quoted 11 lines
 drivers/media/pci/cx88/cx88-blackbird.c         | 2 +-
 drivers/media/pci/dt3155/dt3155.c               | 2 +-
 drivers/media/platform/fsl-viu.c                | 2 +-
 drivers/media/platform/m2m-deinterlace.c        | 2 +-
 drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
 drivers/media/platform/mx2_emmaprp.c            | 2 +-
 drivers/media/platform/s5p-g2d/g2d.c            | 2 +-
 drivers/media/platform/ti-vpe/cal.c             | 2 +-
 drivers/media/platform/ti-vpe/vpe.c             | 2 +-
 drivers/media/platform/via-camera.c             | 2 +-
 drivers/media/platform/vim2m.c                  | 2 +-
Quoted 9 lines

Please, don't do one such cleanup patch per file. Instead, group it per subdirectory, e. g. on e patch for:
drivers/media/platform/

and another one for:
drivers/media/pci/

That makes a lot easier to review and apply.

Okay, I will keep this in mind. Should I send a v2 for both the series?

Thanks,
Bhumika

Quoted 2 lines

Thanks,
Mauro

#13 lore raw

Em Sat, 26 Aug 2017 17:42:34 +0530
Bhumika Goyal <[email protected]> escreveu:

Quoted 35 lines
Quoted 33 lines · Mauro Carvalho Chehab

Em Sat, 26 Aug 2017 15:50:02 +0530
Bhumika Goyal <[email protected]> escreveu:

Quoted 14 lines

Make make video_device const.

Bhumika Goyal (10):
[media] cx88: make video_device const [media] dt3155: make video_device const [media]: marvell-ccic: make video_device const [media] mx2-emmaprp: make video_device const [media]: s5p-g2d: make video_device const [media]: ti-vpe: make video_device const [media] via-camera: make video_device const [media]: fsl-viu: make video_device const [media] m2m-deinterlace: make video_device const [media] vim2m: make video_device const

Quoted 11 lines
 drivers/media/pci/cx88/cx88-blackbird.c         | 2 +-
 drivers/media/pci/dt3155/dt3155.c               | 2 +-
 drivers/media/platform/fsl-viu.c                | 2 +-
 drivers/media/platform/m2m-deinterlace.c        | 2 +-
 drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
 drivers/media/platform/mx2_emmaprp.c            | 2 +-
 drivers/media/platform/s5p-g2d/g2d.c            | 2 +-
 drivers/media/platform/ti-vpe/cal.c             | 2 +-
 drivers/media/platform/ti-vpe/vpe.c             | 2 +-
 drivers/media/platform/via-camera.c             | 2 +-
 drivers/media/platform/vim2m.c                  | 2 +-  

Please, don't do one such cleanup patch per file. Instead, group it per subdirectory, e. g. on e patch for:
drivers/media/platform/

Quoted 7 lines
Quoted 5 lines

and another one for:
drivers/media/pci/

That makes a lot easier to review and apply.

Okay, I will keep this in mind. Should I send a v2 for both the series?

Yes, please.

Thanks,
Mauro