aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pxa_camera.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-08-25 10:46:54 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-18 23:19:06 -0400
commit08590b9613f7f624fe3a052586eea2dbb3584b38 (patch)
treea893d250a4edf84e93794be59e2b1d859314c972 /drivers/media/video/pxa_camera.c
parent961801bbb3448a86f0cc93747cecbfae686d81d1 (diff)
V4L/DVB (12529): soc-camera: switch to s_crop v4l2-subdev video operation
Remove set_crop soc-camera device method and switch to s_crop from v4l2-subdev video operations. Also extend non-i2c drivers to also hold a pointer to their v4l2-subdev instance in control device driver-data, i.e., in dev_get_drvdata((struct device *)to_soc_camera_control(icd)) Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pxa_camera.c')
-rw-r--r--drivers/media/video/pxa_camera.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c
index 0e4daaad2f4d..c38ce84b944d 100644
--- a/drivers/media/video/pxa_camera.c
+++ b/drivers/media/video/pxa_camera.c
@@ -1281,10 +1281,13 @@ static int pxa_camera_get_formats(struct soc_camera_device *icd, int idx,
1281} 1281}
1282 1282
1283static int pxa_camera_set_crop(struct soc_camera_device *icd, 1283static int pxa_camera_set_crop(struct soc_camera_device *icd,
1284 struct v4l2_rect *rect) 1284 struct v4l2_crop *a)
1285{ 1285{
1286 struct v4l2_rect *rect = &a->c;
1286 struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); 1287 struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
1287 struct pxa_camera_dev *pcdev = ici->priv; 1288 struct pxa_camera_dev *pcdev = ici->priv;
1289 struct device *control = to_soc_camera_control(icd);
1290 struct v4l2_subdev *sd = dev_get_drvdata(control);
1288 struct soc_camera_sense sense = { 1291 struct soc_camera_sense sense = {
1289 .master_clock = pcdev->mclk, 1292 .master_clock = pcdev->mclk,
1290 .pixel_clock_max = pcdev->ciclk / 4, 1293 .pixel_clock_max = pcdev->ciclk / 4,
@@ -1295,7 +1298,7 @@ static int pxa_camera_set_crop(struct soc_camera_device *icd,
1295 if (pcdev->platform_flags & PXA_CAMERA_PCLK_EN) 1298 if (pcdev->platform_flags & PXA_CAMERA_PCLK_EN)
1296 icd->sense = &sense; 1299 icd->sense = &sense;
1297 1300
1298 ret = icd->ops->set_crop(icd, rect); 1301 ret = v4l2_subdev_call(sd, video, s_crop, a);
1299 1302
1300 icd->sense = NULL; 1303 icd->sense = NULL;
1301 1304