]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[media] V4L: pxa_camera: remove redundant calculations
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Tue, 7 Jun 2011 08:42:57 +0000 (05:42 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:53:21 +0000 (17:53 -0300)
soc_camera core now performs the standard .bytesperline and .sizeimage
calculations internally, no need to duplicate in drivers.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/pxa_camera.c

index c5b27a4cda30b449f98754e8099afcd99f98897a..bc8600b443bc203fee3971a6f5f94d14d3a077f1 100644 (file)
@@ -1498,12 +1498,6 @@ static int pxa_camera_try_fmt(struct soc_camera_device *icd,
                              &pix->height, 32, 2048, 0,
                              pixfmt == V4L2_PIX_FMT_YUV422P ? 4 : 0);
 
-       pix->bytesperline = soc_mbus_bytes_per_line(pix->width,
-                                                   xlate->host_fmt);
-       if (pix->bytesperline < 0)
-               return pix->bytesperline;
-       pix->sizeimage = pix->height * pix->bytesperline;
-
        /* limit to sensor capabilities */
        mf.width        = pix->width;
        mf.height       = pix->height;