All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: v4l: constify v4l2_ioctls[]
@ 2018-11-14 19:04 Eric Biggers
  0 siblings, 0 replies; only message in thread
From: Eric Biggers @ 2018-11-14 19:04 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, linux-media

From: Eric Biggers <ebiggers@google.com>

v4l2_ioctls[] is never modified, so mark it 'const'.
This way it gets placed in .rodata.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 drivers/media/v4l2-core/v4l2-ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index c63746968fa3d..fc23455820336 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -2586,7 +2586,7 @@ DEFINE_V4L_STUB_FUNC(enum_dv_timings)
 DEFINE_V4L_STUB_FUNC(query_dv_timings)
 DEFINE_V4L_STUB_FUNC(dv_timings_cap)
 
-static struct v4l2_ioctl_info v4l2_ioctls[] = {
+static const struct v4l2_ioctl_info v4l2_ioctls[] = {
 	IOCTL_INFO(VIDIOC_QUERYCAP, v4l_querycap, v4l_print_querycap, 0),
 	IOCTL_INFO(VIDIOC_ENUM_FMT, v4l_enum_fmt, v4l_print_fmtdesc, INFO_FL_CLEAR(v4l2_fmtdesc, type)),
 	IOCTL_INFO(VIDIOC_G_FMT, v4l_g_fmt, v4l_print_format, 0),
-- 
2.19.1.930.g4563a0d9d0-goog

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

only message in thread, other threads:[~2018-11-15  5:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-14 19:04 [PATCH] media: v4l: constify v4l2_ioctls[] Eric Biggers

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.