Shorten v4l2_async_notifier_fwnode_parse_endpoint by using v4l2_async_notifier_add_fwnode_remote_subdev. Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> --- drivers/media/v4l2-core/v4l2-fwnode.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c index 27827842dffd..74af7065996a 100644 --- a/drivers/media/v4l2-core/v4l2-fwnode.c +++ b/drivers/media/v4l2-core/v4l2-fwnode.c @@ -615,15 +615,6 @@ v4l2_async_notifier_fwnode_parse_endpoint(struct device *dev, if (!asd) return -ENOMEM; - asd->match_type = V4L2_ASYNC_MATCH_FWNODE; - asd->match.fwnode = - fwnode_graph_get_remote_endpoint(endpoint); - if (!asd->match.fwnode) { - dev_dbg(dev, "no remote endpoint found\n"); - ret = -ENOTCONN; - goto out_err; - } - ret = v4l2_fwnode_endpoint_alloc_parse(endpoint, &vep); if (ret) { dev_warn(dev, "unable to parse V4L2 fwnode endpoint (%d)\n", @@ -643,7 +634,8 @@ v4l2_async_notifier_fwnode_parse_endpoint(struct device *dev, if (ret < 0) goto out_err; - ret = v4l2_async_notifier_add_subdev(notifier, asd); + ret = v4l2_async_notifier_add_fwnode_remote_subdev(notifier, endpoint, + asd); if (ret < 0) { /* not an error if asd already exists */ if (ret == -EEXIST) -- 2.11.0