Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: hantro: Constify static struct v4l2_m2m_ops

The only usage of vpu_m2m_ops is to pass its address to v4l2_m2m_init()
which has a pointer to const struct v4l2_m2m_ops as argument. Make it
const to allow the compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Rikard Falkeborn and committed by
Mauro Carvalho Chehab
d47fed7a 51fa3b70

+1 -1
+1 -1
drivers/staging/media/hantro/hantro_drv.c
··· 179 179 hantro_job_finish_no_pm(ctx->dev, ctx, VB2_BUF_STATE_ERROR); 180 180 } 181 181 182 - static struct v4l2_m2m_ops vpu_m2m_ops = { 182 + static const struct v4l2_m2m_ops vpu_m2m_ops = { 183 183 .device_run = device_run, 184 184 }; 185 185