[media] V4L: soc-camera: remove soc-camera bus and devices on it
[pandora-kernel.git] / drivers / media / video / soc_camera_platform.c
index bf406e8..8069cd6 100644 (file)
@@ -146,7 +146,7 @@ static int soc_camera_platform_probe(struct platform_device *pdev)
        if (!p)
                return -EINVAL;
 
-       if (!p->dev) {
+       if (!p->icd) {
                dev_err(&pdev->dev,
                        "Platform has not set soc_camera_device pointer!\n");
                return -EINVAL;
@@ -156,16 +156,16 @@ static int soc_camera_platform_probe(struct platform_device *pdev)
        if (!priv)
                return -ENOMEM;
 
-       icd = to_soc_camera_dev(p->dev);
+       icd = p->icd;
 
        /* soc-camera convention: control's drvdata points to the subdev */
        platform_set_drvdata(pdev, &priv->subdev);
        /* Set the control device reference */
-       dev_set_drvdata(&icd->dev, &pdev->dev);
+       icd->control = &pdev->dev;
 
        icd->ops = &soc_camera_platform_ops;
 
-       ici = to_soc_camera_host(icd->dev.parent);
+       ici = to_soc_camera_host(icd->parent);
 
        v4l2_subdev_init(&priv->subdev, &platform_subdev_ops);
        v4l2_set_subdevdata(&priv->subdev, p);
@@ -188,7 +188,7 @@ static int soc_camera_platform_remove(struct platform_device *pdev)
 {
        struct soc_camera_platform_priv *priv = get_priv(pdev);
        struct soc_camera_platform_info *p = pdev->dev.platform_data;
-       struct soc_camera_device *icd = to_soc_camera_dev(p->dev);
+       struct soc_camera_device *icd = p->icd;
 
        v4l2_device_unregister_subdev(&priv->subdev);
        icd->ops = NULL;