diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-08-25 10:46:59 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-18 23:19:07 -0400 |
commit | c9c1f1c0dbe90b82939917fdc3e4c9ccad42342d (patch) | |
tree | 0a6605999055710b88c71c546f6b2507e675e845 /drivers/media/video/pxa_camera.c | |
parent | 08590b9613f7f624fe3a052586eea2dbb3584b38 (diff) |
V4L/DVB (12530): soc-camera: switch to using v4l2_subdev_call()
Use v4l2_subdev_call() instead of v4l2_device_call_until_err() in all host
drivers and in soc-camera core.
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.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index c38ce84b944d..4bc2a4f81f79 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -1286,8 +1286,7 @@ static int pxa_camera_set_crop(struct soc_camera_device *icd, | |||
1286 | struct v4l2_rect *rect = &a->c; | 1286 | struct v4l2_rect *rect = &a->c; |
1287 | 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); |
1288 | struct pxa_camera_dev *pcdev = ici->priv; | 1288 | struct pxa_camera_dev *pcdev = ici->priv; |
1289 | struct device *control = to_soc_camera_control(icd); | 1289 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
1290 | struct v4l2_subdev *sd = dev_get_drvdata(control); | ||
1291 | struct soc_camera_sense sense = { | 1290 | struct soc_camera_sense sense = { |
1292 | .master_clock = pcdev->mclk, | 1291 | .master_clock = pcdev->mclk, |
1293 | .pixel_clock_max = pcdev->ciclk / 4, | 1292 | .pixel_clock_max = pcdev->ciclk / 4, |
@@ -1323,6 +1322,7 @@ static int pxa_camera_set_fmt(struct soc_camera_device *icd, | |||
1323 | { | 1322 | { |
1324 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 1323 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); |
1325 | struct pxa_camera_dev *pcdev = ici->priv; | 1324 | struct pxa_camera_dev *pcdev = ici->priv; |
1325 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); | ||
1326 | const struct soc_camera_data_format *cam_fmt = NULL; | 1326 | const struct soc_camera_data_format *cam_fmt = NULL; |
1327 | const struct soc_camera_format_xlate *xlate = NULL; | 1327 | const struct soc_camera_format_xlate *xlate = NULL; |
1328 | struct soc_camera_sense sense = { | 1328 | struct soc_camera_sense sense = { |
@@ -1346,7 +1346,7 @@ static int pxa_camera_set_fmt(struct soc_camera_device *icd, | |||
1346 | icd->sense = &sense; | 1346 | icd->sense = &sense; |
1347 | 1347 | ||
1348 | cam_f.fmt.pix.pixelformat = cam_fmt->fourcc; | 1348 | cam_f.fmt.pix.pixelformat = cam_fmt->fourcc; |
1349 | ret = v4l2_device_call_until_err(&ici->v4l2_dev, 0, video, s_fmt, f); | 1349 | ret = v4l2_subdev_call(sd, video, s_fmt, f); |
1350 | 1350 | ||
1351 | icd->sense = NULL; | 1351 | icd->sense = NULL; |
1352 | 1352 | ||
@@ -1375,6 +1375,7 @@ static int pxa_camera_try_fmt(struct soc_camera_device *icd, | |||
1375 | struct v4l2_format *f) | 1375 | struct v4l2_format *f) |
1376 | { | 1376 | { |
1377 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 1377 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); |
1378 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); | ||
1378 | const struct soc_camera_format_xlate *xlate; | 1379 | const struct soc_camera_format_xlate *xlate; |
1379 | struct v4l2_pix_format *pix = &f->fmt.pix; | 1380 | struct v4l2_pix_format *pix = &f->fmt.pix; |
1380 | __u32 pixfmt = pix->pixelformat; | 1381 | __u32 pixfmt = pix->pixelformat; |
@@ -1404,7 +1405,7 @@ static int pxa_camera_try_fmt(struct soc_camera_device *icd, | |||
1404 | /* camera has to see its format, but the user the original one */ | 1405 | /* camera has to see its format, but the user the original one */ |
1405 | pix->pixelformat = xlate->cam_fmt->fourcc; | 1406 | pix->pixelformat = xlate->cam_fmt->fourcc; |
1406 | /* limit to sensor capabilities */ | 1407 | /* limit to sensor capabilities */ |
1407 | ret = v4l2_device_call_until_err(&ici->v4l2_dev, 0, video, try_fmt, f); | 1408 | ret = v4l2_subdev_call(sd, video, try_fmt, f); |
1408 | pix->pixelformat = xlate->host_fmt->fourcc; | 1409 | pix->pixelformat = xlate->host_fmt->fourcc; |
1409 | 1410 | ||
1410 | field = pix->field; | 1411 | field = pix->field; |