aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/soc_camera_platform.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2011-07-15 19:03:38 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 16:56:08 -0400
commit7dfff95366f48bf66f77c17cdc9ebd8be696ac5d (patch)
treec4cb975f5b8b8c3008921d38fa6e4deed9c8dbc9 /drivers/media/video/soc_camera_platform.c
parentd33b290a149dafe2e3cc2901ec726bea09a2c0f4 (diff)
[media] V4L: soc-camera: remove soc-camera bus and devices on it
Now that v4l2 subdevices have got their own device objects, having one more device in soc-camera clients became redundant and confusing. This patch removes those devices and the soc-camera bus, they used to reside on. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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;