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/mx1_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/mx1_camera.c')
-rw-r--r-- | drivers/media/video/mx1_camera.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c index add496fca4d3..ed7856bdad48 100644 --- a/drivers/media/video/mx1_camera.c +++ b/drivers/media/video/mx1_camera.c | |||
@@ -465,9 +465,7 @@ static void mx1_camera_remove_device(struct soc_camera_device *icd) | |||
465 | static int mx1_camera_set_crop(struct soc_camera_device *icd, | 465 | static int mx1_camera_set_crop(struct soc_camera_device *icd, |
466 | struct v4l2_crop *a) | 466 | struct v4l2_crop *a) |
467 | { | 467 | { |
468 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 468 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
469 | struct device *control = to_soc_camera_control(icd); | ||
470 | struct v4l2_subdev *sd = dev_get_drvdata(control); | ||
471 | 469 | ||
472 | return v4l2_subdev_call(sd, video, s_crop, a); | 470 | return v4l2_subdev_call(sd, video, s_crop, a); |
473 | } | 471 | } |
@@ -539,7 +537,7 @@ static int mx1_camera_set_bus_param(struct soc_camera_device *icd, __u32 pixfmt) | |||
539 | static int mx1_camera_set_fmt(struct soc_camera_device *icd, | 537 | static int mx1_camera_set_fmt(struct soc_camera_device *icd, |
540 | struct v4l2_format *f) | 538 | struct v4l2_format *f) |
541 | { | 539 | { |
542 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 540 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
543 | const struct soc_camera_format_xlate *xlate; | 541 | const struct soc_camera_format_xlate *xlate; |
544 | struct v4l2_pix_format *pix = &f->fmt.pix; | 542 | struct v4l2_pix_format *pix = &f->fmt.pix; |
545 | int ret; | 543 | int ret; |
@@ -550,7 +548,7 @@ static int mx1_camera_set_fmt(struct soc_camera_device *icd, | |||
550 | return -EINVAL; | 548 | return -EINVAL; |
551 | } | 549 | } |
552 | 550 | ||
553 | ret = v4l2_device_call_until_err(&ici->v4l2_dev, 0, video, s_fmt, f); | 551 | ret = v4l2_subdev_call(sd, video, s_fmt, f); |
554 | if (!ret) { | 552 | if (!ret) { |
555 | icd->buswidth = xlate->buswidth; | 553 | icd->buswidth = xlate->buswidth; |
556 | icd->current_fmt = xlate->host_fmt; | 554 | icd->current_fmt = xlate->host_fmt; |
@@ -562,11 +560,11 @@ static int mx1_camera_set_fmt(struct soc_camera_device *icd, | |||
562 | static int mx1_camera_try_fmt(struct soc_camera_device *icd, | 560 | static int mx1_camera_try_fmt(struct soc_camera_device *icd, |
563 | struct v4l2_format *f) | 561 | struct v4l2_format *f) |
564 | { | 562 | { |
565 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 563 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
566 | /* TODO: limit to mx1 hardware capabilities */ | 564 | /* TODO: limit to mx1 hardware capabilities */ |
567 | 565 | ||
568 | /* limit to sensor capabilities */ | 566 | /* limit to sensor capabilities */ |
569 | return v4l2_device_call_until_err(&ici->v4l2_dev, 0, video, try_fmt, f); | 567 | return v4l2_subdev_call(sd, video, try_fmt, f); |
570 | } | 568 | } |
571 | 569 | ||
572 | static int mx1_camera_reqbufs(struct soc_camera_file *icf, | 570 | static int mx1_camera_reqbufs(struct soc_camera_file *icf, |