Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sakari Ailus and committed by
Hans Verkuil
f17d2896 bb10fdfe

+1 -1
+1 -1
include/media/v4l2-subdev.h
··· 1103 1103 typeof(ent) __me_sd_ent = (ent); \ 1104 1104 \ 1105 1105 __me_sd_ent ? \ 1106 - container_of(__me_sd_ent, struct v4l2_subdev, entity) : \ 1106 + container_of_const(__me_sd_ent, struct v4l2_subdev, entity) : \ 1107 1107 NULL; \ 1108 1108 }) 1109 1109