Commit 1da0028b authored by Enrico Scholz's avatar Enrico Scholz

media:mxc-mipi-csi2_yav: shuffled initializaion order of dev data

v4l2_async methods might require these data
Signed-off-by: Enrico Scholz's avatarEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
parent 8b973039
......@@ -604,6 +604,12 @@ static int mipi_csi2_probe(struct platform_device *pdev)
csi2dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
csi2dev->sd.dev = &pdev->dev;
/* This allows to retrieve the platform device id by the host driver */
v4l2_set_subdevdata(&csi2dev->sd, pdev);
/* .. and a pointer to the subdev. */
platform_set_drvdata(pdev, csi2dev);
/* First register a v4l2 device */
ret = v4l2_device_register(dev, &csi2dev->v4l2_dev);
if (ret) {
......@@ -621,12 +627,6 @@ static int mipi_csi2_probe(struct platform_device *pdev)
if (ret < 0)
goto e_clkdis;
/* This allows to retrieve the platform device id by the host driver */
v4l2_set_subdevdata(&csi2dev->sd, pdev);
/* .. and a pointer to the subdev. */
platform_set_drvdata(pdev, csi2dev);
ret = mipi_csi2_clk_enable(csi2dev);
if (ret < 0)
goto e_clkdis;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment