[PATCH v1] media: pci: intel: ivsc: use new v4l2-async API for mei_csi subdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Follow new v4l2-async API for mei_csi subdev.

Signed-off-by: Wentong Wu <wentong.wu@xxxxxxxxx>

---
v1:
 - based on https://git.linuxtv.org/sailus/media_tree.git tree

---
 drivers/media/pci/intel/ivsc/mei_csi.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/media/pci/intel/ivsc/mei_csi.c b/drivers/media/pci/intel/ivsc/mei_csi.c
index 264b85b..f720326 100644
--- a/drivers/media/pci/intel/ivsc/mei_csi.c
+++ b/drivers/media/pci/intel/ivsc/mei_csi.c
@@ -571,12 +571,13 @@ static const struct media_entity_operations mei_csi_entity_ops = {
 
 static int mei_csi_notify_bound(struct v4l2_async_notifier *notifier,
 				struct v4l2_subdev *subdev,
-				struct v4l2_async_subdev *asd)
+				struct v4l2_async_connection *asd)
 {
 	struct mei_csi *csi = notifier_to_csi(notifier);
 	int pad;
 
-	pad = media_entity_get_fwnode_pad(&subdev->entity, asd->match.fwnode,
+	pad = media_entity_get_fwnode_pad(&subdev->entity,
+					  subdev->fwnode,
 					  MEDIA_PAD_FL_SOURCE);
 	if (pad < 0)
 		return pad;
@@ -592,7 +593,7 @@ static int mei_csi_notify_bound(struct v4l2_async_notifier *notifier,
 
 static void mei_csi_notify_unbind(struct v4l2_async_notifier *notifier,
 				  struct v4l2_subdev *subdev,
-				  struct v4l2_async_subdev *asd)
+				  struct v4l2_async_connection *asd)
 {
 	struct mei_csi *csi = notifier_to_csi(notifier);
 
@@ -645,7 +646,7 @@ static int mei_csi_parse_firmware(struct mei_csi *csi)
 		.bus_type = V4L2_MBUS_CSI2_DPHY,
 	};
 	struct device *dev = &csi->cldev->dev;
-	struct v4l2_async_subdev *asd;
+	struct v4l2_async_connection *asd;
 	struct fwnode_handle *fwnode;
 	struct fwnode_handle *ep;
 	int ret;
@@ -666,11 +667,11 @@ static int mei_csi_parse_firmware(struct mei_csi *csi)
 	fwnode = fwnode_graph_get_remote_endpoint(ep);
 	fwnode_handle_put(ep);
 
-	v4l2_async_nf_init(&csi->notifier);
+	v4l2_async_subdev_nf_init(&csi->notifier, &csi->subdev);
 	csi->notifier.ops = &mei_csi_notify_ops;
 
 	asd = v4l2_async_nf_add_fwnode(&csi->notifier, fwnode,
-				       struct v4l2_async_subdev);
+				       struct v4l2_async_connection);
 	if (IS_ERR(asd)) {
 		fwnode_handle_put(fwnode);
 		return PTR_ERR(asd);
@@ -682,7 +683,7 @@ static int mei_csi_parse_firmware(struct mei_csi *csi)
 		return ret;
 	csi->nr_of_lanes = v4l2_ep.bus.mipi_csi2.num_data_lanes;
 
-	ret = v4l2_async_subdev_nf_register(&csi->subdev, &csi->notifier);
+	ret = v4l2_async_nf_register(&csi->notifier);
 	if (ret)
 		v4l2_async_nf_cleanup(&csi->notifier);
 
-- 
2.7.4




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux