Skip to content

Commit 8b9209c

Browse files
Sakari Ailusgregkh
authored andcommitted
media: v4l2-fwnode: v4l2_fwnode_endpoint_parse caller must init vep argument
[ Upstream commit b3cc73d ] Document that the caller of v4l2_fwnode_endpoint_parse() must init the fields of struct v4l2_fwnode_endpoint (vep argument) fields. It used to be that the fields were zeroed by v4l2_fwnode_endpoint_parse when bus type was set to V4L2_MBUS_UNKNOWN but with recent changes (Fixes: line below) that no longer makes sense. Fixes: bb4bba9 ("media: v4l2-fwnode: Make bus configuration a struct") Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent f43c832 commit 8b9209c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎include/media/v4l2-fwnode.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ struct v4l2_fwnode_connector {
231231
* guessing @vep.bus_type between CSI-2 D-PHY, parallel and BT.656 busses is
232232
* supported. NEVER RELY ON GUESSING @vep.bus_type IN NEW DRIVERS!
233233
*
234+
* The caller is required to initialise all fields of @vep, either with
235+
* explicitly values, or by zeroing them.
236+
*
234237
* The function does not change the V4L2 fwnode endpoint state if it fails.
235238
*
236239
* NOTE: This function does not parse properties the size of which is variable
@@ -273,6 +276,9 @@ void v4l2_fwnode_endpoint_free(struct v4l2_fwnode_endpoint *vep);
273276
* guessing @vep.bus_type between CSI-2 D-PHY, parallel and BT.656 busses is
274277
* supported. NEVER RELY ON GUESSING @vep.bus_type IN NEW DRIVERS!
275278
*
279+
* The caller is required to initialise all fields of @vep, either with
280+
* explicitly values, or by zeroing them.
281+
*
276282
* The function does not change the V4L2 fwnode endpoint state if it fails.
277283
*
278284
* v4l2_fwnode_endpoint_alloc_parse() has two important differences to

0 commit comments

Comments
 (0)