From patchwork Thu Apr 2 08:55:05 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herbrechtsmeier X-Patchwork-Id: 15896 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n329n8KB026571 for ; Thu, 2 Apr 2009 09:49:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752978AbZDBJtI (ORCPT ); Thu, 2 Apr 2009 05:49:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757263AbZDBJtI (ORCPT ); Thu, 2 Apr 2009 05:49:08 -0400 Received: from mail.uni-paderborn.de ([131.234.142.9]:4770 "EHLO mail.uni-paderborn.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756278AbZDBJtH (ORCPT ); Thu, 2 Apr 2009 05:49:07 -0400 Received: from [131.234.87.230] (helo=[127.0.1.1]) by mail.uni-paderborn.de with esmtp (Exim 4.63 spheron) id 1LpJXi-0007gR-JK; Thu, 02 Apr 2009 11:49:04 +0200 MIME-Version: 1.0 Subject: [PATCH] soc_camera: Fix debug output of supported formats count X-Mercurial-Node: 77e3600851e692cb4ee999656b94cb46604a98a6 Message-Id: <77e3600851e692cb4ee9.1238662505@SCT-Book> Date: Thu, 02 Apr 2009 10:55:05 +0200 From: Stefan Herbrechtsmeier To: Linux Media Mailing List Cc: Guennadi Liakhovetski X-IMT-Spam-Score: 0.8 () X-PMX-Version: 5.5.2.363555, Antispam-Engine: 2.6.1.350677, Antispam-Data: 2009.4.2.93412 X-PerlMx-Spam: Gauge=IIIIIII, Probability=8%, Report='BODY_SIZE_1000_LESS 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_600_699 0, BODY_SIZE_7000_LESS 0, INVALID_MSGID_NO_FQDN 0, __CP_MEDIA_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' X-IMT-Authenticated-Sender: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The supported formats count must be set to 0 after debug output right before the second pass. --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/linux/drivers/media/video/soc_camera.c b/linux/drivers/media/video/soc_camera.c --- a/linux/drivers/media/video/soc_camera.c +++ b/linux/drivers/media/video/soc_camera.c @@ -236,11 +236,11 @@ static int soc_camera_init_user_formats( 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;