1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/6.6/target/linux/bcm27xx/patches-6.6/0919-media-ov64a40-Use-container_of_const.patch
Ycarus (Yannick Chabanois) 12de1d2995 Add RPI kernel 6.6 support
2024-04-05 20:55:33 +02:00

31 lines
967 B
Diff

From 3c3e2f983391913891979aed64ed563f20a34c83 Mon Sep 17 00:00:00 2001
From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Date: Thu, 29 Feb 2024 09:32:34 +0100
Subject: [PATCH 0919/1002] media: ov64a40: Use container_of_const()
The container_of_const(), introduced in Linux v6.2, allows to preserve
the const-ness of a pointer.
Use it in the sd_to_ov64a40() function.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
---
drivers/media/i2c/ov64a40.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/ov64a40.c b/drivers/media/i2c/ov64a40.c
index adb5a96112ed..16c64041a63c 100644
--- a/drivers/media/i2c/ov64a40.c
+++ b/drivers/media/i2c/ov64a40.c
@@ -2858,7 +2858,7 @@ struct ov64a40 {
static inline struct ov64a40 *sd_to_ov64a40(struct v4l2_subdev *sd)
{
- return container_of(sd, struct ov64a40, sd);
+ return container_of_const(sd, struct ov64a40, sd);
}
static const struct ov64a40_timings *
--
2.44.0