summaryrefslogtreecommitdiff
path: root/drivers/media/platform/samsung
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2023-02-23 16:24:48 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-08-10 07:58:32 +0200
commitb8ec754ae4c563f6aab8c0cb47aeb2eae67f1da3 (patch)
tree390dad8cbc7b995091751e1011d3cd8d9839ed1c /drivers/media/platform/samsung
parent5651bab6890a0c5d126e2559b4aa353bed201e47 (diff)
media: v4l: async: Set v4l2_device and subdev in async notifier init
Set the v4l2_device already in async notifier init, so struct device related to it will be available before the notifier is registered. This requires separating notifier initialisation into two functions, one that takes v4l2_device as its argument, v4l2_async_nf_init and v4l2_async_subdev_nf_init, for sub-device notifiers. Registering the notifier will use a single function, v4l2_async_nf_register. This is done in order to make struct device available earlier, during construction of the async connections, for sensible debug prints. 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/platform/samsung')
-rw-r--r--drivers/media/platform/samsung/exynos4-is/media-dev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/platform/samsung/exynos4-is/media-dev.c b/drivers/media/platform/samsung/exynos4-is/media-dev.c
index cb9a22b5b6b1..5f10bb4eb4f7 100644
--- a/drivers/media/platform/samsung/exynos4-is/media-dev.c
+++ b/drivers/media/platform/samsung/exynos4-is/media-dev.c
@@ -1478,7 +1478,7 @@ static int fimc_md_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, fmd);
- v4l2_async_nf_init(&fmd->subdev_notifier);
+ v4l2_async_nf_init(&fmd->subdev_notifier, &fmd->v4l2_dev);
ret = fimc_md_register_platform_entities(fmd, dev->of_node);
if (ret)
@@ -1506,8 +1506,7 @@ static int fimc_md_probe(struct platform_device *pdev)
fmd->subdev_notifier.ops = &subdev_notifier_ops;
fmd->num_sensors = 0;
- ret = v4l2_async_nf_register(&fmd->v4l2_dev,
- &fmd->subdev_notifier);
+ ret = v4l2_async_nf_register(&fmd->subdev_notifier);
if (ret)
goto err_clk_p;
}