From: Sakari Ailus Date: Thu, 2 Oct 2025 10:32:53 +0000 (+0300) Subject: media: v4l2-subdev: Make media_entity_to_v4l2_subdev() const-aware X-Git-Tag: v6.19-rc1~159^2~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f17d28968b7ba8722aa218d2e1362e8b5e010bc6;p=thirdparty%2Fkernel%2Flinux.git media: v4l2-subdev: Make media_entity_to_v4l2_subdev() const-aware Retain the constness of the object in media_entity_to_v4l2_subdev(), by switching to container_of_const(). Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil --- diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index e0bb58cb6d042..a37d9a847196b 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -1103,7 +1103,7 @@ struct v4l2_subdev { typeof(ent) __me_sd_ent = (ent); \ \ __me_sd_ent ? \ - container_of(__me_sd_ent, struct v4l2_subdev, entity) : \ + container_of_const(__me_sd_ent, struct v4l2_subdev, entity) : \ NULL; \ })