From: Christophe JAILLET Date: Mon, 24 Jun 2024 04:40:38 +0000 (+0200) Subject: media: ti: cal: Constify struct media_entity_operations X-Git-Tag: v6.12-rc1~82^2~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d66f9b2a47898ecfa50c80aa59a23002dad3a35a;p=thirdparty%2Fkernel%2Fstable.git media: ti: cal: Constify struct media_entity_operations 'struct media_entity_operations' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 20694 1394 32 22120 5668 drivers/media/platform/ti/cal/cal-camerarx.o After: ===== text data bss dec hex filename 20726 1362 32 22120 5668 drivers/media/platform/ti/cal/cal-camerarx.o Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/platform/ti/cal/cal-camerarx.c b/drivers/media/platform/ti/cal/cal-camerarx.c index 4afc2ad003303..42dfe08b765f6 100644 --- a/drivers/media/platform/ti/cal/cal-camerarx.c +++ b/drivers/media/platform/ti/cal/cal-camerarx.c @@ -798,7 +798,7 @@ static const struct v4l2_subdev_internal_ops cal_camerarx_internal_ops = { .init_state = cal_camerarx_sd_init_state, }; -static struct media_entity_operations cal_camerarx_media_ops = { +static const struct media_entity_operations cal_camerarx_media_ops = { .link_validate = v4l2_subdev_link_validate, };