Commit 2744782e authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[media] soc-camera: Pass the physical device to the power operation

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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1858c99d
...@@ -62,7 +62,7 @@ static int soc_camera_power_on(struct soc_camera_device *icd, ...@@ -62,7 +62,7 @@ static int soc_camera_power_on(struct soc_camera_device *icd,
} }
if (icl->power) { if (icl->power) {
ret = icl->power(icd->pdev, 1); ret = icl->power(icd->control, 1);
if (ret < 0) { if (ret < 0) {
dev_err(icd->pdev, dev_err(icd->pdev,
"Platform failed to power-on the camera.\n"); "Platform failed to power-on the camera.\n");
...@@ -78,7 +78,7 @@ static int soc_camera_power_on(struct soc_camera_device *icd, ...@@ -78,7 +78,7 @@ static int soc_camera_power_on(struct soc_camera_device *icd,
esdpwr: esdpwr:
if (icl->power) if (icl->power)
icl->power(icd->pdev, 0); icl->power(icd->control, 0);
elinkpwr: elinkpwr:
regulator_bulk_disable(icl->num_regulators, regulator_bulk_disable(icl->num_regulators,
icl->regulators); icl->regulators);
...@@ -95,7 +95,7 @@ static int soc_camera_power_off(struct soc_camera_device *icd, ...@@ -95,7 +95,7 @@ static int soc_camera_power_off(struct soc_camera_device *icd,
return ret; return ret;
if (icl->power) { if (icl->power) {
ret = icl->power(icd->pdev, 0); ret = icl->power(icd->control, 0);
if (ret < 0) { if (ret < 0) {
dev_err(icd->pdev, dev_err(icd->pdev,
"Platform failed to power-off the camera.\n"); "Platform failed to power-off the camera.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment