mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: go7007: Constify static struct snd_device_ops
@ 2022-01-25 23:46 Rikard Falkeborn
  0 siblings, 0 replies; only message in thread
From: Rikard Falkeborn @ 2022-01-25 23:46 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab
  Cc: linux-media, linux-kernel, Rikard Falkeborn

The only usage of go7007_snd_device_ops is to pass its address to
snd_device_new() which takes a pointer to const struct snd_device_ops.
Make it const to allow the compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
 drivers/media/usb/go7007/snd-go7007.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/go7007/snd-go7007.c b/drivers/media/usb/go7007/snd-go7007.c
index 2ce85ab38db5..9a6bd87fce03 100644
--- a/drivers/media/usb/go7007/snd-go7007.c
+++ b/drivers/media/usb/go7007/snd-go7007.c
@@ -191,7 +191,7 @@ static int go7007_snd_free(struct snd_device *device)
 	return 0;
 }
 
-static struct snd_device_ops go7007_snd_device_ops = {
+static const struct snd_device_ops go7007_snd_device_ops = {
 	.dev_free	= go7007_snd_free,
 };
 
-- 
2.35.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-25 23:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25 23:46 [PATCH] media: go7007: Constify static struct snd_device_ops Rikard Falkeborn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®