aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/soc_camera/soc_camera.c
diff options
context:
space:
mode:
authorJosh Wu <josh.wu@atmel.com>2015-02-10 04:31:33 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-02 17:34:10 -0400
commit0b9508aa030f8119c20fcf64b4b36bc792b59d41 (patch)
treeaa1577fb8939736f44ea6198008179935d034a1c /drivers/media/platform/soc_camera/soc_camera.c
parent4f528afcfbcac540c8690b41307cac5c22088ff1 (diff)
[media] media: soc-camera: use icd->control instead of icd->pdev for reset()
icd->control is the sub device dev, i.e. i2c device. icd->pdev is the soc camera device's device. To be consitent with power() function, we will call reset() with icd->control as well. Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/soc_camera/soc_camera.c')
-rw-r--r--drivers/media/platform/soc_camera/soc_camera.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index 2049037149a1..b26d4d4c03d4 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -688,7 +688,8 @@ static int soc_camera_open(struct file *file)
688 688
689 /* The camera could have been already on, try to reset */ 689 /* The camera could have been already on, try to reset */
690 if (sdesc->subdev_desc.reset) 690 if (sdesc->subdev_desc.reset)
691 sdesc->subdev_desc.reset(icd->pdev); 691 if (icd->control)
692 sdesc->subdev_desc.reset(icd->control);
692 693
693 ret = soc_camera_add_device(icd); 694 ret = soc_camera_add_device(icd);
694 if (ret < 0) { 695 if (ret < 0) {
@@ -1159,7 +1160,8 @@ static void scan_add_host(struct soc_camera_host *ici)
1159 1160
1160 /* The camera could have been already on, try to reset */ 1161 /* The camera could have been already on, try to reset */
1161 if (ssdd->reset) 1162 if (ssdd->reset)
1162 ssdd->reset(icd->pdev); 1163 if (icd->control)
1164 ssdd->reset(icd->control);
1163 1165
1164 icd->parent = ici->v4l2_dev.dev; 1166 icd->parent = ici->v4l2_dev.dev;
1165 1167
@@ -1445,7 +1447,7 @@ static int soc_camera_async_bound(struct v4l2_async_notifier *notifier,
1445 memcpy(&sdesc->subdev_desc, ssdd, 1447 memcpy(&sdesc->subdev_desc, ssdd,
1446 sizeof(sdesc->subdev_desc)); 1448 sizeof(sdesc->subdev_desc));
1447 if (ssdd->reset) 1449 if (ssdd->reset)
1448 ssdd->reset(icd->pdev); 1450 ssdd->reset(&client->dev);
1449 } 1451 }
1450 1452
1451 icd->control = &client->dev; 1453 icd->control = &client->dev;