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: mt9m111: cropcap and s_crop check if type is VIDEO_CAPTURE
Author:  Michael Grzeschik <m.grzesc...@pengutronix.de>
Date:    Tue Aug 3 07:57:44 2010 -0300

Signed-off-by: Philipp Wiesner <p.wies...@phytec.de>
Signed-off-by: Michael Grzeschik <m.grzesc...@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovet...@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mche...@redhat.com>

 drivers/media/video/mt9m111.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

---

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

diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
index 758a4db..28df175 100644
--- a/drivers/media/video/mt9m111.c
+++ b/drivers/media/video/mt9m111.c
@@ -447,6 +447,9 @@ static int mt9m111_s_crop(struct v4l2_subdev *sd, struct 
v4l2_crop *a)
        dev_dbg(&client->dev, "%s left=%d, top=%d, width=%d, height=%d\n",
                __func__, rect.left, rect.top, rect.width, rect.height);
 
+       if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+               return -EINVAL;
+
        ret = mt9m111_make_rect(client, &rect);
        if (!ret)
                mt9m111->rect = rect;
@@ -466,12 +469,14 @@ static int mt9m111_g_crop(struct v4l2_subdev *sd, struct 
v4l2_crop *a)
 
 static int mt9m111_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a)
 {
+       if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+               return -EINVAL;
+
        a->bounds.left                  = MT9M111_MIN_DARK_COLS;
        a->bounds.top                   = MT9M111_MIN_DARK_ROWS;
        a->bounds.width                 = MT9M111_MAX_WIDTH;
        a->bounds.height                = MT9M111_MAX_HEIGHT;
        a->defrect                      = a->bounds;
-       a->type                         = V4L2_BUF_TYPE_VIDEO_CAPTURE;
        a->pixelaspect.numerator        = 1;
        a->pixelaspect.denominator      = 1;
 

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to