mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 04:19:23 -04:00
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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
cb8c9f3153
commit
765f60568f
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user