aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-05-09 17:12:28 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-15 15:14:42 -0400
commitfec0f72f5f7bceb75234417999a149abe24da347 (patch)
tree16d81c52031c7b14c49a29b1ac93640a86b25134 /drivers/media/video
parent9633c0867fb5fc1eef8bd3c4e7f413034d2c5367 (diff)
[media] V4L: sh_mobile_ceu_camera: don't fail TRY_FMT
VIDIOC_TRY_FMT shouldn't fail if the user requests an unsupported pixel format. Instead the driver should replace it with a supported one. Fix the sh_mobile_ceu_camera driver accordingly. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/sh_mobile_ceu_camera.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c
index 2ffeb21dfe33..61f7f91de931 100644
--- a/drivers/media/video/sh_mobile_ceu_camera.c
+++ b/drivers/media/video/sh_mobile_ceu_camera.c
@@ -1858,8 +1858,12 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd,
1858 1858
1859 xlate = soc_camera_xlate_by_fourcc(icd, pixfmt); 1859 xlate = soc_camera_xlate_by_fourcc(icd, pixfmt);
1860 if (!xlate) { 1860 if (!xlate) {
1861 dev_warn(icd->parent, "Format %x not found\n", pixfmt); 1861 xlate = icd->current_fmt;
1862 return -EINVAL; 1862 dev_dbg(icd->parent, "Format %x not found, keeping %x\n",
1863 pixfmt, xlate->host_fmt->fourcc);
1864 pixfmt = xlate->host_fmt->fourcc;
1865 pix->pixelformat = pixfmt;
1866 pix->colorspace = icd->colorspace;
1863 } 1867 }
1864 1868
1865 /* FIXME: calculate using depth and bus width */ 1869 /* FIXME: calculate using depth and bus width */