media: v4l: fwnode: Use fwnode_graph_for_each_endpoint
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 21 Dec 2017 12:11:19 +0000 (07:11 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 4 Oct 2018 20:02:00 +0000 (16:02 -0400)
Use fwnode_graph_for_each_endpoint iterator for better readability.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/v4l2-fwnode.c

index fc8c63e..ab457cf 100644 (file)
@@ -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;