Commit 497d574d authored by Niklas Söderlund's avatar Niklas Söderlund Committed by Mauro Carvalho Chehab

media: rcar-vin: Use v4l2_async_subdev instead of fwnode_handle to match subdevices

In preparation of removing the usage of the old helper
v4l2_async_notifier_parse_fwnode_endpoints_by_port() use the
v4l2_async_subdev instead of fwnode_handle to match subdevices.
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent b9ad52aa
...@@ -772,7 +772,7 @@ static void rvin_group_notify_unbind(struct v4l2_async_notifier *notifier, ...@@ -772,7 +772,7 @@ static void rvin_group_notify_unbind(struct v4l2_async_notifier *notifier,
mutex_lock(&vin->group->lock); mutex_lock(&vin->group->lock);
for (i = 0; i < RVIN_CSI_MAX; i++) { for (i = 0; i < RVIN_CSI_MAX; i++) {
if (vin->group->csi[i].fwnode != asd->match.fwnode) if (vin->group->csi[i].asd != asd)
continue; continue;
vin->group->csi[i].subdev = NULL; vin->group->csi[i].subdev = NULL;
vin_dbg(vin, "Unbind CSI-2 %s from slot %u\n", subdev->name, i); vin_dbg(vin, "Unbind CSI-2 %s from slot %u\n", subdev->name, i);
...@@ -794,7 +794,7 @@ static int rvin_group_notify_bound(struct v4l2_async_notifier *notifier, ...@@ -794,7 +794,7 @@ static int rvin_group_notify_bound(struct v4l2_async_notifier *notifier,
mutex_lock(&vin->group->lock); mutex_lock(&vin->group->lock);
for (i = 0; i < RVIN_CSI_MAX; i++) { for (i = 0; i < RVIN_CSI_MAX; i++) {
if (vin->group->csi[i].fwnode != asd->match.fwnode) if (vin->group->csi[i].asd != asd)
continue; continue;
vin->group->csi[i].subdev = subdev; vin->group->csi[i].subdev = subdev;
vin_dbg(vin, "Bound CSI-2 %s to slot %u\n", subdev->name, i); vin_dbg(vin, "Bound CSI-2 %s to slot %u\n", subdev->name, i);
...@@ -830,14 +830,14 @@ static int rvin_mc_parse_of_endpoint(struct device *dev, ...@@ -830,14 +830,14 @@ static int rvin_mc_parse_of_endpoint(struct device *dev,
mutex_lock(&vin->group->lock); mutex_lock(&vin->group->lock);
if (vin->group->csi[vep->base.id].fwnode) { if (vin->group->csi[vep->base.id].asd) {
vin_dbg(vin, "OF device %pOF already handled\n", vin_dbg(vin, "OF device %pOF already handled\n",
to_of_node(asd->match.fwnode)); to_of_node(asd->match.fwnode));
ret = -ENOTCONN; ret = -ENOTCONN;
goto out; goto out;
} }
vin->group->csi[vep->base.id].fwnode = asd->match.fwnode; vin->group->csi[vep->base.id].asd = asd;
vin_dbg(vin, "Add group OF device %pOF to slot %u\n", vin_dbg(vin, "Add group OF device %pOF to slot %u\n",
to_of_node(asd->match.fwnode), vep->base.id); to_of_node(asd->match.fwnode), vep->base.id);
......
...@@ -280,7 +280,7 @@ struct rvin_group { ...@@ -280,7 +280,7 @@ struct rvin_group {
struct rvin_dev *vin[RCAR_VIN_NUM]; struct rvin_dev *vin[RCAR_VIN_NUM];
struct { struct {
struct fwnode_handle *fwnode; struct v4l2_async_subdev *asd;
struct v4l2_subdev *subdev; struct v4l2_subdev *subdev;
} csi[RVIN_CSI_MAX]; } csi[RVIN_CSI_MAX];
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment