All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] v4l2: av7110_v4l: constify v4l2_audio structure
@ 2017-08-14  5:43 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2017-08-14  5:43 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: kernel-janitors, linux-media, linux-kernel, Bhumika Goyal

This v4l2_audio structure is only copied into other structures,
so it can be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/media/pci/ttpci/av7110_v4l.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/ttpci/av7110_v4l.c b/drivers/media/pci/ttpci/av7110_v4l.c
index 397fe14..e4cf42c 100644
--- a/drivers/media/pci/ttpci/av7110_v4l.c
+++ b/drivers/media/pci/ttpci/av7110_v4l.c
@@ -218,7 +218,7 @@ static int stv0297_set_tv_freq(struct saa7146_dev *dev, u32 freq)
 static struct saa7146_standard dvb_standard[];
 static struct saa7146_standard standard[];
 
-static struct v4l2_audio msp3400_v4l2_audio = {
+static const struct v4l2_audio msp3400_v4l2_audio = {
 	.index = 0,
 	.name = "Television",
 	.capability = V4L2_AUDCAP_STEREO

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] [media] v4l2: av7110_v4l: constify v4l2_audio structure
@ 2017-08-14  5:43 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2017-08-14  5:43 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: kernel-janitors, linux-media, linux-kernel, Bhumika Goyal

This v4l2_audio structure is only copied into other structures,
so it can be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/media/pci/ttpci/av7110_v4l.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/ttpci/av7110_v4l.c b/drivers/media/pci/ttpci/av7110_v4l.c
index 397fe14..e4cf42c 100644
--- a/drivers/media/pci/ttpci/av7110_v4l.c
+++ b/drivers/media/pci/ttpci/av7110_v4l.c
@@ -218,7 +218,7 @@ static int stv0297_set_tv_freq(struct saa7146_dev *dev, u32 freq)
 static struct saa7146_standard dvb_standard[];
 static struct saa7146_standard standard[];
 
-static struct v4l2_audio msp3400_v4l2_audio = {
+static const struct v4l2_audio msp3400_v4l2_audio = {
 	.index = 0,
 	.name = "Television",
 	.capability = V4L2_AUDCAP_STEREO


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-14  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-14  5:43 [PATCH] [media] v4l2: av7110_v4l: constify v4l2_audio structure Julia Lawall
2017-08-14  5:43 ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.