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>
pull/1354/merge
Sakari Ailus 2025-10-02 13:32:53 +03:00 committed by Hans Verkuil
parent bb10fdfe8d
commit f17d28968b
1 changed files with 1 additions and 1 deletions

View File

@ -1103,7 +1103,7 @@ struct v4l2_subdev {
typeof(ent) __me_sd_ent = (ent); \ typeof(ent) __me_sd_ent = (ent); \
\ \
__me_sd_ent ? \ __me_sd_ent ? \
container_of(__me_sd_ent, struct v4l2_subdev, entity) : \ container_of_const(__me_sd_ent, struct v4l2_subdev, entity) : \
NULL; \ NULL; \
}) })