diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2023-09-15 14:23:28 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-10-07 10:55:48 +0200 |
commit | 76c0b99d614127ceadcd3563dee4983c20627e09 (patch) | |
tree | 35f97b032b937f1a35dfe248e0a4dca572cc3c1e /drivers/media/v4l2-core | |
parent | 07d81b507df5622db40104c64dace3387bbe23b9 (diff) | |
download | linux-76c0b99d614127ceadcd3563dee4983c20627e09.tar.gz linux-76c0b99d614127ceadcd3563dee4983c20627e09.tar.bz2 linux-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 <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-subdev.c | 9 |
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, }; |