Hi Sakari, Thank you for the patch. On Thu, Jun 22, 2023 at 12:41 PM Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> wrote: > > Initialise the V4L2 async notifier after registering the V4L2 device, just > before parsing DT for async sub-devices. This way the device can be made > available to the V4L2 async framework from the notifier init time onwards. > A subsequent patch will add struct v4l2_device as an argument to > v4l2_async_nf_init(). > > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > Tested-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> # imx6qp > Tested_by: Niklas Söderlund <niklas.soderlund@xxxxxxxxxxxx> # rcar + adv746x > Tested-by: Aishwarya Kothari <aishwarya.kothari@xxxxxxxxxxx> # Apalis i.MX6Q with TC358743 > --- > .../media/platform/ti/davinci/vpif_capture.c | 17 ++++++++--------- > 1 file changed, 8 insertions(+), 9 deletions(-) > > diff --git a/drivers/media/platform/ti/davinci/vpif_capture.c b/drivers/media/platform/ti/davinci/vpif_capture.c > index a63c9e51dac41..9b97e26be0892 100644 > --- a/drivers/media/platform/ti/davinci/vpif_capture.c > +++ b/drivers/media/platform/ti/davinci/vpif_capture.c > @@ -1608,18 +1608,12 @@ static __init int vpif_probe(struct platform_device *pdev) > int res_idx = 0; > int i, err; > > - pdev->dev.platform_data = vpif_capture_get_pdata(pdev); > - if (!pdev->dev.platform_data) { > - dev_warn(&pdev->dev, "Missing platform data. Giving up.\n"); > - return -EINVAL; > - } > - > vpif_dev = &pdev->dev; > > err = initialize_vpif(); > if (err) { > v4l2_err(vpif_dev->driver, "Error initializing vpif\n"); > - goto cleanup; > + return err; > } > > err = v4l2_device_register(vpif_dev, &vpif_obj.v4l2_dev); > @@ -1655,6 +1649,12 @@ static __init int vpif_probe(struct platform_device *pdev) > goto vpif_unregister; > } > > + pdev->dev.platform_data = vpif_capture_get_pdata(pdev); Just a couple of lines above we reference pdev->dev.platform_data while assigning it to vpif_obj.config, so this has to be moved prior to assigning vpif_obj.config. > + if (!pdev->dev.platform_data) { > + dev_warn(&pdev->dev, "Missing platform data. Giving up.\n"); unrelated to this patch maybe we can drop the extra space after data. Giving.. Cheers, Prabhakar