diff options
author | Guennadi Liakhovetski <lyakh@axis700.grange> | 2008-12-01 07:44:53 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:38:21 -0500 |
commit | a2c8c68cca3dbb0c87f5034ab8ea29350174ec4a (patch) | |
tree | ec5aa7c75e6bfeaec6fc365d47941dbb18cda098 /drivers/media/video/pxa_camera.c | |
parent | b3d7b2ad9cd7612354d921ba948ab6514699519c (diff) |
V4L/DVB (9785): soc-camera: merge .try_bus_param() into .try_fmt_cap()
.try_bus_param() method from struct soc_camera_host_ops is only called at one
location immediately before .try_fmt_cap(), there is no value in keeping these
two methods separate, merge them.
Signed-off-by: Guennadi Liakhovetski <lg@denx.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 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index eb6be5802928..2a811f8584b5 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -913,6 +913,11 @@ static int pxa_camera_set_fmt_cap(struct soc_camera_device *icd, | |||
913 | static int pxa_camera_try_fmt_cap(struct soc_camera_device *icd, | 913 | static int pxa_camera_try_fmt_cap(struct soc_camera_device *icd, |
914 | struct v4l2_format *f) | 914 | struct v4l2_format *f) |
915 | { | 915 | { |
916 | int ret = pxa_camera_try_bus_param(icd, f->fmt.pix.pixelformat); | ||
917 | |||
918 | if (ret < 0) | ||
919 | return ret; | ||
920 | |||
916 | /* limit to pxa hardware capabilities */ | 921 | /* limit to pxa hardware capabilities */ |
917 | if (f->fmt.pix.height < 32) | 922 | if (f->fmt.pix.height < 32) |
918 | f->fmt.pix.height = 32; | 923 | f->fmt.pix.height = 32; |
@@ -1039,7 +1044,6 @@ static struct soc_camera_host_ops pxa_soc_camera_host_ops = { | |||
1039 | .reqbufs = pxa_camera_reqbufs, | 1044 | .reqbufs = pxa_camera_reqbufs, |
1040 | .poll = pxa_camera_poll, | 1045 | .poll = pxa_camera_poll, |
1041 | .querycap = pxa_camera_querycap, | 1046 | .querycap = pxa_camera_querycap, |
1042 | .try_bus_param = pxa_camera_try_bus_param, | ||
1043 | .set_bus_param = pxa_camera_set_bus_param, | 1047 | .set_bus_param = pxa_camera_set_bus_param, |
1044 | }; | 1048 | }; |
1045 | 1049 | ||