All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: video4linux-list@redhat.com
Subject: PATCH: gspca-mercurial: fix debugging output
Date: Wed, 02 Jul 2008 23:25:49 +0200	[thread overview]
Message-ID: <486BF25D.5090005@hhs.nl> (raw)

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

Hi All,

This patch makes CONFIG_VIDEO_ADV_DEBUG actually work for gspca

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>

Regards,

Hans

[-- Attachment #2: gspca-fix-debug.patch --]
[-- Type: text/x-patch, Size: 3355 bytes --]

Make CONFIG_VIDEO_ADV_DEBUG actually work for gspca

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
--- gspca-2bbb47f61a95/linux/drivers/media/video/gspca/gspca.c.dbg	2008-07-02 11:14:56.000000000 +0200
+++ gspca-2bbb47f61a95/linux/drivers/media/video/gspca/gspca.c	2008-07-02 20:02:12.000000000 +0200
@@ -50,7 +50,7 @@ static int video_nr = -1;
 
 static int comp_fac = 30;	/* Buffer size ratio when compressed in % */
 
-#ifdef VIDEO_ADV_DEBUG
+#ifdef CONFIG_VIDEO_ADV_DEBUG
 int gspca_debug = D_ERR | D_PROBE;
 EXPORT_SYMBOL(gspca_debug);
 
@@ -823,7 +823,7 @@ static int try_fmt_vid_cap(struct gspca_
 	/* (luvcview problem) */
 	if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG)
 		fmt->fmt.pix.pixelformat = V4L2_PIX_FMT_JPEG;
-#ifdef VIDEO_ADV_DEBUG
+#ifdef CONFIG_VIDEO_ADV_DEBUG
 	if (gspca_debug & D_CONF)
 		PDEBUG_MODE("try fmt cap", fmt->fmt.pix.pixelformat, w, h);
 #endif
@@ -843,7 +843,7 @@ static int try_fmt_vid_cap(struct gspca_
 			/* no chance, return this mode */
 			fmt->fmt.pix.pixelformat =
 					gspca_dev->cam.cam_mode[mode].pixfmt;
-#ifdef VIDEO_ADV_DEBUG
+#ifdef CONFIG_VIDEO_ADV_DEBUG
 			if (gspca_debug & D_CONF) {
 				PDEBUG_MODE("new format",
 					fmt->fmt.pix.pixelformat,
@@ -958,7 +958,7 @@ static int dev_open(struct inode *inode,
 	}
 	gspca_dev->users++;
 	file->private_data = gspca_dev;
-#ifdef VIDEO_ADV_DEBUG
+#ifdef CONFIG_VIDEO_ADV_DEBUG
 	/* activate the v4l2 debug */
 	if (gspca_debug & D_V4L2)
 		gspca_dev->vdev.debug |= 3;
@@ -1231,7 +1231,7 @@ static int vidioc_streamon(struct file *
 		if (ret < 0)
 			goto out;
 	}
-#ifdef VIDEO_ADV_DEBUG
+#ifdef CONFIG_VIDEO_ADV_DEBUG
 	if (gspca_debug & D_STREAM) {
 		PDEBUG_MODE("stream on OK",
 			gspca_dev->pixfmt,
@@ -1986,7 +1986,7 @@ static void __exit gspca_exit(void)
 module_init(gspca_init);
 module_exit(gspca_exit);
 
-#ifdef VIDEO_ADV_DEBUG
+#ifdef CONFIG_VIDEO_ADV_DEBUG
 module_param_named(debug, gspca_debug, int, 0644);
 MODULE_PARM_DESC(debug,
 		"Debug (bit) 0x01:error 0x02:probe 0x04:config"
--- gspca-2bbb47f61a95/linux/drivers/media/video/gspca/gspca.h.dbg	2008-07-02 11:14:56.000000000 +0200
+++ gspca-2bbb47f61a95/linux/drivers/media/video/gspca/gspca.h	2008-07-02 20:10:16.000000000 +0200
@@ -28,7 +28,7 @@
 #define V4L2_CID_SHARPNESS  (V4L2_CID_BASE+27)
 #endif
 
-#ifdef VIDEO_ADV_DEBUG
+#ifdef CONFIG_VIDEO_ADV_DEBUG
 /* GSPCA our debug messages */
 extern int gspca_debug;
 #define PDEBUG(level, fmt, args...) \
--- gspca-2bbb47f61a95/linux/drivers/media/video/gspca/zc3xx.c.dbg	2008-07-02 11:14:56.000000000 +0200
+++ gspca-2bbb47f61a95/linux/drivers/media/video/gspca/zc3xx.c	2008-07-02 20:02:13.000000000 +0200
@@ -6436,7 +6436,7 @@ static void setcontrast(struct gspca_dev
 		0, Tgradient_1, Tgradient_2,
 		Tgradient_3, Tgradient_4, Tgradient_5, Tgradient_6
 	};
-#ifdef VIDEO_ADV_DEBUG
+#ifdef CONFIG_VIDEO_ADV_DEBUG
 	__u8 v[16];
 #endif
 
@@ -6454,7 +6454,7 @@ static void setcontrast(struct gspca_dev
 		else if (g <= 0)
 			g = 1;
 		reg_w(dev, g, 0x0120 + i);	/* gamma */
-#ifdef VIDEO_ADV_DEBUG
+#ifdef CONFIG_VIDEO_ADV_DEBUG
 		if (gspca_debug & D_CONF)
 			v[i] = g;
 #endif
@@ -6474,7 +6474,7 @@ static void setcontrast(struct gspca_dev
 				g = 1;
 		}
 		reg_w(dev, g, 0x0130 + i);	/* gradient */
-#ifdef VIDEO_ADV_DEBUG
+#ifdef CONFIG_VIDEO_ADV_DEBUG
 		if (gspca_debug & D_CONF)
 			v[i] = g;
 #endif

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

                 reply	other threads:[~2008-07-02 21:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=486BF25D.5090005@hhs.nl \
    --to=j.w.r.degoede@hhs.nl \
    --cc=moinejf@free.fr \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.