media: mc: entity: Add entity iterator for media_pipeline
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 21 Dec 2022 09:33:38 +0000 (10:33 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 6 Feb 2023 07:33:44 +0000 (08:33 +0100)
commiteac564de0915433716b83fad800d00675ccc6972
tree6b91ad1e3275f1f7bfbff32c3ae6524d030690c5
parentd10ac51e8a047e613bee8309739d122e48e00bcb
media: mc: entity: Add entity iterator for media_pipeline

Add a media_pipeline_for_each_entity() macro to iterate over entities in
a pipeline. This should be used by driver as a replacement of the
media_graph_walk API, as iterating over the media_pipeline uses the
cached list of pads and is thus more efficient.

Deprecate the media_graph_walk API to indicate it shouldn't be used in
new drivers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/mc/mc-entity.c
include/media/media-entity.h