1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 01:20:14 +00:00

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 <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
Sakari Ailus 2025-10-02 13:32:53 +03:00 committed by Hans Verkuil
parent bb10fdfe8d
commit f17d28968b

View File

@ -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; \
})