summaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2023-05-11 14:08:42 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-07-28 10:52:40 +0200
commit765f60568f2904b2de3011a8de2fadba4e4de44f (patch)
treeb34610a4664c6774bb1931adc6f4326fad6ded7c /drivers/media/v4l2-core
parentcb8c9f3153004cb0930682816497426969ead27f (diff)
downloadlinux-765f60568f2904b2de3011a8de2fadba4e4de44f.tar.gz
linux-765f60568f2904b2de3011a8de2fadba4e4de44f.tar.bz2
linux-765f60568f2904b2de3011a8de2fadba4e4de44f.zip
media: v4l: async: Try more connections
When an async sub-device is registered, it used to be that the first one of its connections were matched when found. Continue looking for matches until a notifier no longer has any. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # imx6qp Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> # rcar + adv746x Tested-by: Aishwarya Kothari <aishwarya.kothari@toradex.com> # Apalis i.MX6Q with TC358743 Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # Renesas RZ/G2L SMARC Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r--drivers/media/v4l2-core/v4l2-async.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
index 44f72aa75c19..6b3c02d27ebf 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -789,6 +789,7 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)
if (!v4l2_dev)
continue;
+again:
asc = v4l2_async_find_match(notifier, sd);
if (!asc)
continue;
@@ -801,13 +802,12 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)
if (ret)
goto err_unbind;
- goto out_unlock;
+ goto again;
}
/* None matched, wait for hot-plugging */
list_add(&sd->async_list, &subdev_list);
-out_unlock:
mutex_unlock(&list_lock);
return 0;