From: Sakari Ailus Date: Thu, 21 Dec 2017 12:11:19 +0000 (-0500) Subject: media: v4l: fwnode: Use fwnode_graph_for_each_endpoint X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=106ee387f622bb5d32da0444f038ad4a8c48e228;p=openwrt%2Fstaging%2Fblogic.git media: v4l: fwnode: Use fwnode_graph_for_each_endpoint Use fwnode_graph_for_each_endpoint iterator for better readability. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Tested-by: Steve Longerbeam Tested-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c index fc8c63eba10b..ab457cf36ba5 100644 --- a/drivers/media/v4l2-core/v4l2-fwnode.c +++ b/drivers/media/v4l2-core/v4l2-fwnode.c @@ -456,8 +456,7 @@ static int __v4l2_async_notifier_parse_fwnode_endpoints( if (WARN_ON(asd_struct_size < sizeof(struct v4l2_async_subdev))) return -EINVAL; - for (fwnode = NULL; (fwnode = fwnode_graph_get_next_endpoint( - dev_fwnode(dev), fwnode)); ) { + fwnode_graph_for_each_endpoint(dev_fwnode(dev), fwnode) { struct fwnode_handle *dev_fwnode; bool is_available;