diff mbox series

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

Message ID 1691045257-22642-1-git-send-email-wentong.wu@intel.com (mailing list archive)
State New, archived
Headers show
Series [v1] media: pci: intel: ivsc: use new v4l2-async API for mei_csi subdev | expand

Commit Message

Wu, Wentong Aug. 3, 2023, 6:47 a.m. UTC
Follow new v4l2-async API for mei_csi subdev.

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

---
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(-)

Comments

Sakari Ailus Aug. 3, 2023, 8:48 a.m. UTC | #1
Hi Wentong,

On Thu, Aug 03, 2023 at 02:47:37PM +0800, Wentong Wu wrote:
> Follow new v4l2-async API for mei_csi subdev.
> 
> Signed-off-by: Wentong Wu <wentong.wu@intel.com>

This won't apply, I believe (most of?) the changes are already in the patch
in my tree. Did you forget to update it?
Wu, Wentong Aug. 3, 2023, 8:55 a.m. UTC | #2
Hi Sakari,

Thanks

Yes, it's already there after update your tree.

Thanks
Wentong

> -----Original Message-----
> From: Sakari Ailus <sakari.ailus@linux.intel.com>
> Sent: Thursday, August 3, 2023 4:48 PM
> 
> Hi Wentong,
> 
> On Thu, Aug 03, 2023 at 02:47:37PM +0800, Wentong Wu wrote:
> > Follow new v4l2-async API for mei_csi subdev.
> >
> > Signed-off-by: Wentong Wu <wentong.wu@intel.com>
> 
> This won't apply, I believe (most of?) the changes are already in the patch in my
> tree. Did you forget to update it?
> 
> --
> Kind regards,
> 
> Sakari Ailus
diff mbox series

Patch

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);