media: ivsc: csi: Clean up notifier set-up
Use v4l2_async_nf_add_fwnode_remote() to add an async fwnode remote sub-device sub-device to the notifier. This avoids dealing with remote endpoints. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Wentong Wu <wentong.wu@intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
e34660972b
commit
a6a42fada1
1 changed files with 3 additions and 7 deletions
|
@ -645,7 +645,6 @@ static int mei_csi_parse_firmware(struct mei_csi *csi)
|
||||||
};
|
};
|
||||||
struct device *dev = &csi->cldev->dev;
|
struct device *dev = &csi->cldev->dev;
|
||||||
struct v4l2_async_connection *asd;
|
struct v4l2_async_connection *asd;
|
||||||
struct fwnode_handle *fwnode;
|
|
||||||
struct fwnode_handle *ep;
|
struct fwnode_handle *ep;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -664,15 +663,12 @@ static int mei_csi_parse_firmware(struct mei_csi *csi)
|
||||||
|
|
||||||
csi->nr_of_lanes = v4l2_ep.bus.mipi_csi2.num_data_lanes;
|
csi->nr_of_lanes = v4l2_ep.bus.mipi_csi2.num_data_lanes;
|
||||||
|
|
||||||
fwnode = fwnode_graph_get_remote_endpoint(ep);
|
|
||||||
fwnode_handle_put(ep);
|
|
||||||
|
|
||||||
v4l2_async_subdev_nf_init(&csi->notifier, &csi->subdev);
|
v4l2_async_subdev_nf_init(&csi->notifier, &csi->subdev);
|
||||||
csi->notifier.ops = &mei_csi_notify_ops;
|
csi->notifier.ops = &mei_csi_notify_ops;
|
||||||
|
|
||||||
asd = v4l2_async_nf_add_fwnode(&csi->notifier, fwnode,
|
asd = v4l2_async_nf_add_fwnode_remote(&csi->notifier, ep,
|
||||||
struct v4l2_async_connection);
|
struct v4l2_async_connection);
|
||||||
fwnode_handle_put(fwnode);
|
fwnode_handle_put(ep);
|
||||||
if (IS_ERR(asd)) {
|
if (IS_ERR(asd)) {
|
||||||
ret = PTR_ERR(asd);
|
ret = PTR_ERR(asd);
|
||||||
goto out_nf_cleanup;
|
goto out_nf_cleanup;
|
||||||
|
|
Loading…
Add table
Reference in a new issue