V4L/DVB (12159): soc_camera: Fix debug output of supported formats count
authorStefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de>
Wed, 24 Jun 2009 13:31:25 +0000 (10:31 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 5 Jul 2009 17:29:56 +0000 (14:29 -0300)
The supported formats count must be set to 0 after debug output
right before the second pass.

Signed-off-by: Stefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/soc_camera.c

index 16f595d4337abfb76b3c08d98bad1ced20cf0b9d..78010abfe8be0dd47a7fa9e2a5ee665f0d5f44c9 100644 (file)
@@ -237,11 +237,11 @@ static int soc_camera_init_user_formats(struct soc_camera_device *icd)
                return -ENOMEM;
 
        icd->num_user_formats = fmts;
-       fmts = 0;
 
        dev_dbg(&icd->dev, "Found %d supported formats.\n", fmts);
 
        /* Second pass - actually fill data formats */
+       fmts = 0;
        for (i = 0; i < icd->num_formats; i++)
                if (!ici->ops->get_formats) {
                        icd->user_formats[i].host_fmt = icd->formats + i;