Commit 52af7863 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman
Browse files

device property: Make fwnode_graph_for_each_endpoint() consistent



Make fwnode_graph_for_each_endpoint() consistent with the rest of
for_each_*() definitions in the file, i.e. use the form of

	for (iter = func(NULL); iter; \
	     iter = func(iter))

as it's done in all the rest of the similar macro definitions.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20230117152120.42531-1-andriy.shevchenko@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ed9f9181
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -437,8 +437,8 @@ unsigned int fwnode_graph_get_endpoint_count(struct fwnode_handle *fwnode,
					     unsigned long flags);

#define fwnode_graph_for_each_endpoint(fwnode, child)				\
	for (child = NULL;						\
	     (child = fwnode_graph_get_next_endpoint(fwnode, child)); )
	for (child = fwnode_graph_get_next_endpoint(fwnode, NULL); child;	\
	     child = fwnode_graph_get_next_endpoint(fwnode, child))

int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
				struct fwnode_endpoint *endpoint);