Skip to content

Commit

Permalink
[media] soc-camera: Pass the physical device to the power operation
Browse files Browse the repository at this point in the history
There will be no soc_camera_device instance with a soc-camera device is
used with a non soc-camera host, so we won't be able to pass the
soc_camera_device fake platform device to board code. Pass the physical
device instead.

The argument is currently not used by any board file so this is safe.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
pinchartl authored and Mauro Carvalho Chehab committed Jul 30, 2012
1 parent 1858c99 commit 2744782
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/video/soc_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static int soc_camera_power_on(struct soc_camera_device *icd,
}

if (icl->power) {
ret = icl->power(icd->pdev, 1);
ret = icl->power(icd->control, 1);
if (ret < 0) {
dev_err(icd->pdev,
"Platform failed to power-on the camera.\n");
Expand All @@ -78,7 +78,7 @@ static int soc_camera_power_on(struct soc_camera_device *icd,

esdpwr:
if (icl->power)
icl->power(icd->pdev, 0);
icl->power(icd->control, 0);
elinkpwr:
regulator_bulk_disable(icl->num_regulators,
icl->regulators);
Expand All @@ -95,7 +95,7 @@ static int soc_camera_power_off(struct soc_camera_device *icd,
return ret;

if (icl->power) {
ret = icl->power(icd->pdev, 0);
ret = icl->power(icd->control, 0);
if (ret < 0) {
dev_err(icd->pdev,
"Platform failed to power-off the camera.\n");
Expand Down

0 comments on commit 2744782

Please sign in to comment.