media: cadence: csi2rx: use match fwnode for media link
authorJulien Massot <julien.massot@collabora.com>
Fri, 5 Jan 2024 09:00:21 +0000 (10:00 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 22 Jan 2024 16:23:58 +0000 (17:23 +0100)
Since commit 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching"),
async connections are matched using the async sub-device fwnode, not that
of the endpoint. Fix this by using the fwnode of the connection match to
find the pad.

Fixes: 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching")
Signed-off-by: Julien Massot <julien.massot@collabora.com>
Reviewed-by: Jai Luthra <j-luthra@ti.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/cadence/cdns-csi2rx.c

index fead5426830e822d25867c636be6bda7a4ac78aa..0ea5fa956fe9a3161688d96c71815e108de9d999 100644 (file)
@@ -468,7 +468,7 @@ static int csi2rx_async_bound(struct v4l2_async_notifier *notifier,
        struct csi2rx_priv *csi2rx = v4l2_subdev_to_csi2rx(subdev);
 
        csi2rx->source_pad = media_entity_get_fwnode_pad(&s_subdev->entity,
-                                                        s_subdev->fwnode,
+                                                        asd->match.fwnode,
                                                         MEDIA_PAD_FL_SOURCE);
        if (csi2rx->source_pad < 0) {
                dev_err(csi2rx->dev, "Couldn't find output pad for subdev %s\n",