mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
media: qcom: camss: use a handy v4l2_async_nf_add_fwnode_remote() function
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>
This commit is contained in:
parent
eccf5fa8e3
commit
77a2ff40c5
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user