aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/pxa_camera.c6
-rw-r--r--drivers/media/video/sh_mobile_ceu_camera.c6
-rw-r--r--drivers/media/video/soc_camera.c5
-rw-r--r--include/media/soc_camera.h1
4 files changed, 10 insertions, 8 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,
913static int pxa_camera_try_fmt_cap(struct soc_camera_device *icd, 913static 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
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c
index 63bc0a6e68b0..87d0f3075811 100644
--- a/drivers/media/video/sh_mobile_ceu_camera.c
+++ b/drivers/media/video/sh_mobile_ceu_camera.c
@@ -459,6 +459,11 @@ static int sh_mobile_ceu_set_fmt_cap(struct soc_camera_device *icd,
459static int sh_mobile_ceu_try_fmt_cap(struct soc_camera_device *icd, 459static int sh_mobile_ceu_try_fmt_cap(struct soc_camera_device *icd,
460 struct v4l2_format *f) 460 struct v4l2_format *f)
461{ 461{
462 int ret = sh_mobile_ceu_try_bus_param(icd, f->fmt.pix.pixelformat);
463
464 if (ret < 0)
465 return ret;
466
462 /* FIXME: calculate using depth and bus width */ 467 /* FIXME: calculate using depth and bus width */
463 468
464 if (f->fmt.pix.height < 4) 469 if (f->fmt.pix.height < 4)
@@ -546,7 +551,6 @@ static struct soc_camera_host_ops sh_mobile_ceu_host_ops = {
546 .reqbufs = sh_mobile_ceu_reqbufs, 551 .reqbufs = sh_mobile_ceu_reqbufs,
547 .poll = sh_mobile_ceu_poll, 552 .poll = sh_mobile_ceu_poll,
548 .querycap = sh_mobile_ceu_querycap, 553 .querycap = sh_mobile_ceu_querycap,
549 .try_bus_param = sh_mobile_ceu_try_bus_param,
550 .set_bus_param = sh_mobile_ceu_set_bus_param, 554 .set_bus_param = sh_mobile_ceu_set_bus_param,
551 .init_videobuf = sh_mobile_ceu_init_videobuf, 555 .init_videobuf = sh_mobile_ceu_init_videobuf,
552}; 556};
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index 28cf5c94bd61..2ebdf4d667e3 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -77,11 +77,6 @@ static int soc_camera_try_fmt_vid_cap(struct file *file, void *priv,
77 return -EINVAL; 77 return -EINVAL;
78 } 78 }
79 79
80 /* test physical bus parameters */
81 ret = ici->ops->try_bus_param(icd, f->fmt.pix.pixelformat);
82 if (ret)
83 return ret;
84
85 /* limit format to hardware capabilities */ 80 /* limit format to hardware capabilities */
86 ret = ici->ops->try_fmt_cap(icd, f); 81 ret = ici->ops->try_fmt_cap(icd, f);
87 82
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index 9231e2d908f2..ee0e6b4bed33 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -73,7 +73,6 @@ struct soc_camera_host_ops {
73 struct soc_camera_device *); 73 struct soc_camera_device *);
74 int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *); 74 int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *);
75 int (*querycap)(struct soc_camera_host *, struct v4l2_capability *); 75 int (*querycap)(struct soc_camera_host *, struct v4l2_capability *);
76 int (*try_bus_param)(struct soc_camera_device *, __u32);
77 int (*set_bus_param)(struct soc_camera_device *, __u32); 76 int (*set_bus_param)(struct soc_camera_device *, __u32);
78 unsigned int (*poll)(struct file *, poll_table *); 77 unsigned int (*poll)(struct file *, poll_table *);
79}; 78};