[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210512173514.16813-1-rikard.falkeborn@gmail.com>
Date: Wed, 12 May 2021 19:35:14 +0200
From: Rikard Falkeborn <rikard.falkeborn@...il.com>
To: Mauro Carvalho Chehab <mchehab@...nel.org>,
Eduardo Valentin <edubezval@...il.com>
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
Rikard Falkeborn <rikard.falkeborn@...il.com>
Subject: [PATCH] media: radio: si4713: constify static struct v4l2_ioctl_ops
The only usage of radio_si4713_ioctl_ops is to assign its address to the
ioctl_ops field in the video_device struct, which is a pointer to const.
Make it const to allow the compiler to put it in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@...il.com>
---
drivers/media/radio/si4713/radio-platform-si4713.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/radio/si4713/radio-platform-si4713.c b/drivers/media/radio/si4713/radio-platform-si4713.c
index a7dfe5f55c18..433f9642786d 100644
--- a/drivers/media/radio/si4713/radio-platform-si4713.c
+++ b/drivers/media/radio/si4713/radio-platform-si4713.c
@@ -110,7 +110,7 @@ static long radio_si4713_default(struct file *file, void *p,
ioctl, cmd, arg);
}
-static struct v4l2_ioctl_ops radio_si4713_ioctl_ops = {
+static const struct v4l2_ioctl_ops radio_si4713_ioctl_ops = {
.vidioc_querycap = radio_si4713_querycap,
.vidioc_g_modulator = radio_si4713_g_modulator,
.vidioc_s_modulator = radio_si4713_s_modulator,
--
2.31.1
Powered by blists - more mailing lists