Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261594
b: refs/heads/master
c: 7254026
h: refs/heads/master
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 4dd9a5d commit a31a4e4
Show file tree
Hide file tree
Showing 2 changed files with 13 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: 2d12421dd39e39f9cacd9c7a58359c0f85823343
refs/heads/master: 7254026cedd42d75009f8a7f2999045007dd444e
20 changes: 12 additions & 8 deletions trunk/drivers/media/video/pxa_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -1577,9 +1577,9 @@ static int pxa_camera_querycap(struct soc_camera_host *ici,
return 0;
}

static int pxa_camera_suspend(struct soc_camera_device *icd, pm_message_t state)
static int pxa_camera_suspend(struct device *dev)
{
struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
struct soc_camera_host *ici = to_soc_camera_host(dev);
struct pxa_camera_dev *pcdev = ici->priv;
int i = 0, ret = 0;

Expand All @@ -1590,7 +1590,7 @@ static int pxa_camera_suspend(struct soc_camera_device *icd, pm_message_t state)
pcdev->save_cicr[i++] = __raw_readl(pcdev->base + CICR4);

if (pcdev->icd) {
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
struct v4l2_subdev *sd = soc_camera_to_subdev(pcdev->icd);
ret = v4l2_subdev_call(sd, core, s_power, 0);
if (ret == -ENOIOCTLCMD)
ret = 0;
Expand All @@ -1599,9 +1599,9 @@ static int pxa_camera_suspend(struct soc_camera_device *icd, pm_message_t state)
return ret;
}

static int pxa_camera_resume(struct soc_camera_device *icd)
static int pxa_camera_resume(struct device *dev)
{
struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
struct soc_camera_host *ici = to_soc_camera_host(dev);
struct pxa_camera_dev *pcdev = ici->priv;
int i = 0, ret = 0;

Expand All @@ -1616,7 +1616,7 @@ static int pxa_camera_resume(struct soc_camera_device *icd)
__raw_writel(pcdev->save_cicr[i++], pcdev->base + CICR4);

if (pcdev->icd) {
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
struct v4l2_subdev *sd = soc_camera_to_subdev(pcdev->icd);
ret = v4l2_subdev_call(sd, core, s_power, 1);
if (ret == -ENOIOCTLCMD)
ret = 0;
Expand All @@ -1633,8 +1633,6 @@ static struct soc_camera_host_ops pxa_soc_camera_host_ops = {
.owner = THIS_MODULE,
.add = pxa_camera_add_device,
.remove = pxa_camera_remove_device,
.suspend = pxa_camera_suspend,
.resume = pxa_camera_resume,
.set_crop = pxa_camera_set_crop,
.get_formats = pxa_camera_get_formats,
.put_formats = pxa_camera_put_formats,
Expand Down Expand Up @@ -1819,9 +1817,15 @@ static int __devexit pxa_camera_remove(struct platform_device *pdev)
return 0;
}

static struct dev_pm_ops pxa_camera_pm = {
.suspend = pxa_camera_suspend,
.resume = pxa_camera_resume,
};

static struct platform_driver pxa_camera_driver = {
.driver = {
.name = PXA_CAM_DRV_NAME,
.pm = &pxa_camera_pm,
},
.probe = pxa_camera_probe,
.remove = __devexit_p(pxa_camera_remove),
Expand Down

0 comments on commit a31a4e4

Please sign in to comment.