From patchwork Mon Jun 15 15:51:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herbrechtsmeier X-Patchwork-Id: 30372 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 n5FGDRAJ027145 for ; Mon, 15 Jun 2009 16:13:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751814AbZFOQNX (ORCPT ); Mon, 15 Jun 2009 12:13:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752674AbZFOQNX (ORCPT ); Mon, 15 Jun 2009 12:13:23 -0400 Received: from mail.uni-paderborn.de ([131.234.142.9]:23045 "EHLO mail.uni-paderborn.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751814AbZFOQNW (ORCPT ); Mon, 15 Jun 2009 12:13:22 -0400 X-Greylist: delayed 1365 seconds by postgrey-1.27 at vger.kernel.org; Mon, 15 Jun 2009 12:13:22 EDT Received: from [131.234.87.224] (helo=[127.0.1.1]) by mail.uni-paderborn.de with esmtp (Exim 4.63 spheron) id 1MGESi-0005yc-Gt; Mon, 15 Jun 2009 17:51:09 +0200 MIME-Version: 1.0 Subject: [PATCH] soc_camera: Fix debug output of supported formats count X-Mercurial-Node: 3125df3f572c37e50daa0adf7121977e6634ac4f Message-Id: <3125df3f572c37e50daa.1245081096@SCT-Book> Date: Mon, 15 Jun 2009 17:51:36 +0200 From: Stefan Herbrechtsmeier To: Linux Media Mailing List Cc: Guennadi Liakhovetski X-IMT-Spam-Score: 0.8 () X-PMX-Version: 5.5.5.374460, Antispam-Engine: 2.7.1.369594, Antispam-Data: 2009.6.15.153742 X-PerlMx-Spam: Gauge=IIIIIIII, Probability=8%, Report=' BODY_SIZE_1000_LESS 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, BODY_SIZE_700_799 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, __TO_MALFORMED_2 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. Signed-off-by: Stefan Herbrechtsmeier --- 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 @@ -238,11 +238,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;