aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core/v4l2-subdev.c
diff options
context:
space:
mode:
authorSakari Ailus <[email protected]>2023-09-15 11:23:28 +0000
committerHans Verkuil <[email protected]>2023-10-07 08:55:48 +0000
commit76c0b99d614127ceadcd3563dee4983c20627e09 (patch)
tree35f97b032b937f1a35dfe248e0a4dca572cc3c1e /drivers/media/v4l2-core/v4l2-subdev.c
parentmedia: ov2740: Return -EPROBE_DEFER if no endpoint is found (diff)
downloadkernel-76c0b99d614127ceadcd3563dee4983c20627e09.tar.gz
kernel-76c0b99d614127ceadcd3563dee4983c20627e09.zip
media: v4l: subdev: Clear frame descriptor before get_frame_desc
Clear frame descriptor before calling transmitter's get_frame_desc() op. Also remove the corresponding memset() calls from drivers. Signed-off-by: Sakari Ailus <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-subdev.c')
-rw-r--r--drivers/media/v4l2-core/v4l2-subdev.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index 32b7d9cd43e6..9cb04ace86ae 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -306,6 +306,14 @@ static int call_set_selection(struct v4l2_subdev *sd,
sd->ops->pad->set_selection(sd, state, sel);
}
+static int call_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
+ struct v4l2_mbus_frame_desc *fd)
+{
+ memset(fd, 0, sizeof(*fd));
+
+ return sd->ops->pad->get_frame_desc(sd, pad, fd);
+}
+
static inline int check_edid(struct v4l2_subdev *sd,
struct v4l2_subdev_edid *edid)
{
@@ -446,6 +454,7 @@ static const struct v4l2_subdev_pad_ops v4l2_subdev_call_pad_wrappers = {
.set_edid = call_set_edid,
.dv_timings_cap = call_dv_timings_cap,
.enum_dv_timings = call_enum_dv_timings,
+ .get_frame_desc = call_get_frame_desc,
.get_mbus_config = call_get_mbus_config,
};