]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: qcom: camss: use a handy v4l2_async_nf_add_fwnode_remote() function
authorVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Thu, 20 Nov 2025 00:46:04 +0000 (02:46 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 13 Jan 2026 09:25:01 +0000 (10:25 +0100)
Another code simplification makes parsing of remote endpoints easy.

Tested-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/qcom/camss/camss.c

index 8e0809202362c33ccead669d82893454146aca6c..7f44b60bcd72cd09b2a75688af4eada85f5f2b0c 100644 (file)
@@ -4271,18 +4271,9 @@ static int camss_parse_ports(struct camss *camss)
 
        fwnode_graph_for_each_endpoint(fwnode, ep) {
                struct camss_async_subdev *csd;
-               struct fwnode_handle *remote;
 
-               remote = fwnode_graph_get_remote_port_parent(ep);
-               if (!remote) {
-                       dev_err(dev, "Cannot get remote parent\n");
-                       ret = -EINVAL;
-                       goto err_cleanup;
-               }
-
-               csd = v4l2_async_nf_add_fwnode(&camss->notifier, remote,
-                                              struct camss_async_subdev);
-               fwnode_handle_put(remote);
+               csd = v4l2_async_nf_add_fwnode_remote(&camss->notifier, ep,
+                                                     typeof(*csd));
                if (IS_ERR(csd)) {
                        ret = PTR_ERR(csd);
                        goto err_cleanup;