aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/soc_camera_platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/soc_camera_platform.c')
-rw-r--r--drivers/media/video/soc_camera_platform.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/soc_camera_platform.c b/drivers/media/video/soc_camera_platform.c
index bf406e89c992..8069cd6bc5e8 100644
--- a/drivers/media/video/soc_camera_platform.c
+++ b/drivers/media/video/soc_camera_platform.c
@@ -146,7 +146,7 @@ static int soc_camera_platform_probe(struct platform_device *pdev)
146 if (!p) 146 if (!p)
147 return -EINVAL; 147 return -EINVAL;
148 148
149 if (!p->dev) { 149 if (!p->icd) {
150 dev_err(&pdev->dev, 150 dev_err(&pdev->dev,
151 "Platform has not set soc_camera_device pointer!\n"); 151 "Platform has not set soc_camera_device pointer!\n");
152 return -EINVAL; 152 return -EINVAL;
@@ -156,16 +156,16 @@ static int soc_camera_platform_probe(struct platform_device *pdev)
156 if (!priv) 156 if (!priv)
157 return -ENOMEM; 157 return -ENOMEM;
158 158
159 icd = to_soc_camera_dev(p->dev); 159 icd = p->icd;
160 160
161 /* soc-camera convention: control's drvdata points to the subdev */ 161 /* soc-camera convention: control's drvdata points to the subdev */
162 platform_set_drvdata(pdev, &priv->subdev); 162 platform_set_drvdata(pdev, &priv->subdev);
163 /* Set the control device reference */ 163 /* Set the control device reference */
164 dev_set_drvdata(&icd->dev, &pdev->dev); 164 icd->control = &pdev->dev;
165 165
166 icd->ops = &soc_camera_platform_ops; 166 icd->ops = &soc_camera_platform_ops;
167 167
168 ici = to_soc_camera_host(icd->dev.parent); 168 ici = to_soc_camera_host(icd->parent);
169 169
170 v4l2_subdev_init(&priv->subdev, &platform_subdev_ops); 170 v4l2_subdev_init(&priv->subdev, &platform_subdev_ops);
171 v4l2_set_subdevdata(&priv->subdev, p); 171 v4l2_set_subdevdata(&priv->subdev, p);
@@ -188,7 +188,7 @@ static int soc_camera_platform_remove(struct platform_device *pdev)
188{ 188{
189 struct soc_camera_platform_priv *priv = get_priv(pdev); 189 struct soc_camera_platform_priv *priv = get_priv(pdev);
190 struct soc_camera_platform_info *p = pdev->dev.platform_data; 190 struct soc_camera_platform_info *p = pdev->dev.platform_data;
191 struct soc_camera_device *icd = to_soc_camera_dev(p->dev); 191 struct soc_camera_device *icd = p->icd;
192 192
193 v4l2_device_unregister_subdev(&priv->subdev); 193 v4l2_device_unregister_subdev(&priv->subdev);
194 icd->ops = NULL; 194 icd->ops = NULL;