From: Rikard Falkeborn Date: Tue, 12 Oct 2021 22:11:44 +0000 (+0200) Subject: media: staging: media: rkvdec: Constify static struct v4l2_m2m_ops X-Git-Tag: v6.1-rc5~2250^2~134 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30162960165fe608f505d2564a9abc8514ffb7df;p=platform%2Fkernel%2Flinux-starfive.git media: staging: media: rkvdec: Constify static struct v4l2_m2m_ops The only usage of rkvdec_m2m_ops is to pass its address to v4l2_m2m_init(), which takes a pointer to const v4l2_m2m_ops as argument. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Ezequiel Garcia Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c index ad2624c30843..c0cf3488f970 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -712,7 +712,7 @@ static void rkvdec_device_run(void *priv) rkvdec_job_finish(ctx, VB2_BUF_STATE_ERROR); } -static struct v4l2_m2m_ops rkvdec_m2m_ops = { +static const struct v4l2_m2m_ops rkvdec_m2m_ops = { .device_run = rkvdec_device_run, };