On Thu Oct 2 13:32:53 2025 +0300, Sakari Ailus wrote:
> Retain the constness of the object in media_entity_to_v4l2_subdev(), by
> switching to container_of_const().
> 
> Signed-off-by: Sakari Ailus <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 include/media/v4l2-subdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index e0bb58cb6d04..a37d9a847196 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;                                                   \
 })
 
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to