Skip to contentSkip to conversation

soc_camera: Fix debug output of supported formats count

PATCH In review Stefan Herbrechtsmeier 2 participants 2 messages Apr 2, 2009 – Jun 11, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc_camera: Fix debug output of supported formats count

The supported formats count must be set to 0 after debug output right before the second pass.

linux/drivers/media/video/soc_camera.c +1 -1
@@ -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;
#1 lore raw
Quoted 3 lines · Stefan Herbrechtsmeier

The supported formats count must be set to 0 after debug output right before the second pass.

Hi Stefan, could you please resend with your Sob?

Thanks
Guennadi

Quoted 7 lines
linux/drivers/media/video/soc_camera.c +0 -0
@@ -236,11 +236,11 @@ static int soc_camera_init_user_formats(
 		return -ENOMEM;
 

linux/drivers/media/video/soc_camera.c static int soc_camera_init_user_formats( · line 246

Quoted 10 lines
linux/drivers/media/video/soc_camera.c +1 -1
 	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;

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/