aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core
diff options
context:
space:
mode:
authorDaniel Scally <djrscally@gmail.com>2021-01-07 14:28:35 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-01-26 19:31:39 +0100
commit06c85233121fabc69ffe6124953cd5304dbf3afd (patch)
treebe6958062bc01c4800823200815f51c4addea445 /drivers/media/v4l2-core
parentmedia: ipu3-cio2: Rename ipu3-cio2.c (diff)
downloadlinux-dev-06c85233121fabc69ffe6124953cd5304dbf3afd.tar.xz
linux-dev-06c85233121fabc69ffe6124953cd5304dbf3afd.zip
media: v4l2-core: v4l2-async: Check sd->fwnode->secondary in match_fwnode()
Where the fwnode graph is comprised of software_nodes, these will be assigned as the secondary to dev->fwnode. Check the v4l2_subdev's fwnode for a secondary and attempt to match against it during match_fwnode() to accommodate that possibility. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Scally <djrscally@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r--drivers/media/v4l2-core/v4l2-async.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
index e3ab003a6c85..9dd896d085ec 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -88,6 +88,14 @@ static bool match_fwnode(struct v4l2_async_notifier *notifier,
return true;
/*
+ * Check the same situation for any possible secondary assigned to the
+ * subdev's fwnode
+ */
+ if (!IS_ERR_OR_NULL(sd->fwnode->secondary) &&
+ sd->fwnode->secondary == asd->match.fwnode)
+ return true;
+
+ /*
* Otherwise, check if the sd fwnode and the asd fwnode refer to an
* endpoint or a device. If they're of the same type, there's no match.
* Technically speaking this checks if the nodes refer to a connected