From 9bf19fbf0c8bc4392210c1ea104a8db732624f3d Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Tue, 18 Apr 2023 14:00:54 +0200 Subject: media: v4l: async: Rework internal lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch re-arranges internal V4L2 async lists for preparation of supporting multiple connections per sub-device as well as cleaning up used lists. The list of unbound V4L2 sub-devices shall be maintained for the purpose of listing those sub-devices only, not for their bindin status. Also, the V4L2 async connections now have, instead of two list entries, a single list entry in the notifier's list, be that either waiting or done lists, while the notifier's asc_list is removed. The one-to-one relation between a sub-device and a connection is still maintained in this patch. Signed-off-by: Sakari Ailus Tested-by: Philipp Zabel # imx6qp Tested-by: Niklas Söderlund # rcar + adv746x Tested-by: Aishwarya Kothari # Apalis i.MX6Q with TC358743 Tested-by: Lad Prabhakar # Renesas RZ/G2L SMARC Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-async.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'include/media') diff --git a/include/media/v4l2-async.h b/include/media/v4l2-async.h index a27d9dc8afcb..c06b3b832228 100644 --- a/include/media/v4l2-async.h +++ b/include/media/v4l2-async.h @@ -66,9 +66,8 @@ struct v4l2_async_match_desc { * * @match: struct of match type and per-bus type matching data sets * @asc_entry: used to add struct v4l2_async_connection objects to the - * master notifier @asc_list - * @waiting_entry: used to link struct v4l2_async_connection objects, waiting to - * be probed, to a notifier->waiting_list list + * notifier @waiting_list or @done_list + * @sd: the related sub-device * * When this struct is used as a member in a driver specific struct, * the driver specific struct shall contain the &struct @@ -77,7 +76,7 @@ struct v4l2_async_match_desc { struct v4l2_async_connection { struct v4l2_async_match_desc match; struct list_head asc_entry; - struct list_head waiting_entry; + struct v4l2_subdev *sd; }; /** @@ -106,7 +105,6 @@ struct v4l2_async_notifier_operations { * @v4l2_dev: v4l2_device of the root notifier, NULL otherwise * @sd: sub-device that registered the notifier, NULL otherwise * @parent: parent notifier - * @asc_list: master list of struct v4l2_async_connection * @waiting_list: list of struct v4l2_async_connection, waiting for their * drivers * @done_list: list of struct v4l2_subdev, already probed @@ -117,7 +115,6 @@ struct v4l2_async_notifier { struct v4l2_device *v4l2_dev; struct v4l2_subdev *sd; struct v4l2_async_notifier *parent; - struct list_head asc_list; struct list_head waiting_list; struct list_head done_list; struct list_head notifier_entry; -- cgit v1.2.3