[media] V4L: pxa-camera: switch to using subdev .s_power() core operation
soc-camera specific .suspend() and .resume() methods are deprecated and should be replaced by the subdev standard .s_power() operation. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
91401219c0
commit
497833c681
|
@ -1589,8 +1589,12 @@ static int pxa_camera_suspend(struct soc_camera_device *icd, pm_message_t state)
|
||||||
pcdev->save_cicr[i++] = __raw_readl(pcdev->base + CICR3);
|
pcdev->save_cicr[i++] = __raw_readl(pcdev->base + CICR3);
|
||||||
pcdev->save_cicr[i++] = __raw_readl(pcdev->base + CICR4);
|
pcdev->save_cicr[i++] = __raw_readl(pcdev->base + CICR4);
|
||||||
|
|
||||||
if ((pcdev->icd) && (pcdev->icd->ops->suspend))
|
if (pcdev->icd) {
|
||||||
ret = pcdev->icd->ops->suspend(pcdev->icd, state);
|
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
|
||||||
|
ret = v4l2_subdev_call(sd, core, s_power, 0);
|
||||||
|
if (ret == -ENOIOCTLCMD)
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1611,8 +1615,12 @@ static int pxa_camera_resume(struct soc_camera_device *icd)
|
||||||
__raw_writel(pcdev->save_cicr[i++], pcdev->base + CICR3);
|
__raw_writel(pcdev->save_cicr[i++], pcdev->base + CICR3);
|
||||||
__raw_writel(pcdev->save_cicr[i++], pcdev->base + CICR4);
|
__raw_writel(pcdev->save_cicr[i++], pcdev->base + CICR4);
|
||||||
|
|
||||||
if ((pcdev->icd) && (pcdev->icd->ops->resume))
|
if (pcdev->icd) {
|
||||||
ret = pcdev->icd->ops->resume(pcdev->icd);
|
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
|
||||||
|
ret = v4l2_subdev_call(sd, core, s_power, 1);
|
||||||
|
if (ret == -ENOIOCTLCMD)
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Restart frame capture if active buffer exists */
|
/* Restart frame capture if active buffer exists */
|
||||||
if (!ret && pcdev->active)
|
if (!ret && pcdev->active)
|
||||||
|
|
Loading…
Reference in New Issue