From: Rikard Falkeborn Date: Tue, 25 Jan 2022 23:46:02 +0000 (+0100) Subject: media: go7007: Constify static struct snd_device_ops X-Git-Tag: v6.1-rc5~1763^2~86^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=524e1eff9a35ae421e2b5c6df85e747311088446;p=platform%2Fkernel%2Flinux-starfive.git media: go7007: Constify static struct snd_device_ops 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 Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/usb/go7007/snd-go7007.c b/drivers/media/usb/go7007/snd-go7007.c index 2ce85ab..9a6bd87 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, };