This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media-tree.git tree:

Subject: V4L/DVB: soc-camera: prohibit S_CROP, if internal G_CROP has failed
Author:  Guennadi Liakhovetski <[email protected]>
Date:    Thu Aug 5 19:23:44 2010 -0300

There is no sense in trying to set cropping if we cannot get current one
from the host driver.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/video/soc_camera.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

---

http://git.linuxtv.org/media-tree.git?a=commitdiff;h=705e4fb5625b363989de139e7fcc27012ff699e1

diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index f203293..a499cac 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -779,9 +779,12 @@ static int soc_camera_s_crop(struct file *file, void *fh,
        ret = ici->ops->get_crop(icd, &current_crop);
 
        /* Prohibit window size change with initialised buffers */
-       if (icf->vb_vidq.bufs[0] && !ret &&
-           (a->c.width != current_crop.c.width ||
-            a->c.height != current_crop.c.height)) {
+       if (ret < 0) {
+               dev_err(&icd->dev,
+                       "S_CROP denied: getting current crop failed\n");
+       } else if (icf->vb_vidq.bufs[0] &&
+                  (a->c.width != current_crop.c.width ||
+                   a->c.height != current_crop.c.height)) {
                dev_err(&icd->dev,
                        "S_CROP denied: queue initialised and sizes differ\n");
                ret = -EBUSY;

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to