Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330863
b: refs/heads/master
c: 24592ad
h: refs/heads/master
i:
  330861: d1ee73c
  330859: 8629110
  330855: b97ffc7
  330847: fd29f65
v: v3
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Aug 15, 2012
1 parent 4be1527 commit 36ea1ca
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37ad4e734bbc27ad1bec2d1cc3ffaa79b1def262
refs/heads/master: 24592adce89805c99eb23d1e37aa8a66aaacee05
22 changes: 14 additions & 8 deletions trunk/drivers/media/platform/soc_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,30 @@ static int soc_camera_power_off(struct soc_camera_device *icd,
struct soc_camera_link *icl)
{
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
int ret = v4l2_subdev_call(sd, core, s_power, 0);
int ret = 0;
int err;

if (ret < 0 && ret != -ENOIOCTLCMD && ret != -ENODEV)
return ret;
err = v4l2_subdev_call(sd, core, s_power, 0);
if (err < 0 && err != -ENOIOCTLCMD && err != -ENODEV) {
dev_err(icd->pdev, "Subdev failed to power-off the camera.\n");
ret = err;
}

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

ret = regulator_bulk_disable(icl->num_regulators,
err = regulator_bulk_disable(icl->num_regulators,
icl->regulators);
if (ret < 0)
if (err < 0) {
dev_err(icd->pdev, "Cannot disable regulators\n");
ret = ret ? : err;
}

return ret;
}
Expand Down

0 comments on commit 36ea1ca

Please sign in to comment.