Commit d646e701 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

V4L/DVB (8191): gspca: Make CONFIG_VIDEO_ADV_DEBUG actually work.

Signed-off-by: default avatarHans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 0c616214
...@@ -50,7 +50,7 @@ static int video_nr = -1; ...@@ -50,7 +50,7 @@ static int video_nr = -1;
static int comp_fac = 30; /* Buffer size ratio when compressed in % */ 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; int gspca_debug = D_ERR | D_PROBE;
EXPORT_SYMBOL(gspca_debug); EXPORT_SYMBOL(gspca_debug);
...@@ -817,7 +817,7 @@ static int try_fmt_vid_cap(struct gspca_dev *gspca_dev, ...@@ -817,7 +817,7 @@ static int try_fmt_vid_cap(struct gspca_dev *gspca_dev,
/* (luvcview problem) */ /* (luvcview problem) */
if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG) if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG)
fmt->fmt.pix.pixelformat = V4L2_PIX_FMT_JPEG; fmt->fmt.pix.pixelformat = V4L2_PIX_FMT_JPEG;
#ifdef VIDEO_ADV_DEBUG #ifdef CONFIG_VIDEO_ADV_DEBUG
if (gspca_debug & D_CONF) if (gspca_debug & D_CONF)
PDEBUG_MODE("try fmt cap", fmt->fmt.pix.pixelformat, w, h); PDEBUG_MODE("try fmt cap", fmt->fmt.pix.pixelformat, w, h);
#endif #endif
...@@ -837,7 +837,7 @@ static int try_fmt_vid_cap(struct gspca_dev *gspca_dev, ...@@ -837,7 +837,7 @@ static int try_fmt_vid_cap(struct gspca_dev *gspca_dev,
/* no chance, return this mode */ /* no chance, return this mode */
fmt->fmt.pix.pixelformat = fmt->fmt.pix.pixelformat =
gspca_dev->cam.cam_mode[mode].pixfmt; gspca_dev->cam.cam_mode[mode].pixfmt;
#ifdef VIDEO_ADV_DEBUG #ifdef CONFIG_VIDEO_ADV_DEBUG
if (gspca_debug & D_CONF) { if (gspca_debug & D_CONF) {
PDEBUG_MODE("new format", PDEBUG_MODE("new format",
fmt->fmt.pix.pixelformat, fmt->fmt.pix.pixelformat,
...@@ -952,7 +952,7 @@ static int dev_open(struct inode *inode, struct file *file) ...@@ -952,7 +952,7 @@ static int dev_open(struct inode *inode, struct file *file)
} }
gspca_dev->users++; gspca_dev->users++;
file->private_data = gspca_dev; file->private_data = gspca_dev;
#ifdef VIDEO_ADV_DEBUG #ifdef CONFIG_VIDEO_ADV_DEBUG
/* activate the v4l2 debug */ /* activate the v4l2 debug */
if (gspca_debug & D_V4L2) if (gspca_debug & D_V4L2)
gspca_dev->vdev.debug |= 3; gspca_dev->vdev.debug |= 3;
...@@ -1225,7 +1225,7 @@ static int vidioc_streamon(struct file *file, void *priv, ...@@ -1225,7 +1225,7 @@ static int vidioc_streamon(struct file *file, void *priv,
if (ret < 0) if (ret < 0)
goto out; goto out;
} }
#ifdef VIDEO_ADV_DEBUG #ifdef CONFIG_VIDEO_ADV_DEBUG
if (gspca_debug & D_STREAM) { if (gspca_debug & D_STREAM) {
PDEBUG_MODE("stream on OK", PDEBUG_MODE("stream on OK",
gspca_dev->pixfmt, gspca_dev->pixfmt,
...@@ -1980,7 +1980,7 @@ static void __exit gspca_exit(void) ...@@ -1980,7 +1980,7 @@ static void __exit gspca_exit(void)
module_init(gspca_init); module_init(gspca_init);
module_exit(gspca_exit); module_exit(gspca_exit);
#ifdef VIDEO_ADV_DEBUG #ifdef CONFIG_VIDEO_ADV_DEBUG
module_param_named(debug, gspca_debug, int, 0644); module_param_named(debug, gspca_debug, int, 0644);
MODULE_PARM_DESC(debug, MODULE_PARM_DESC(debug,
"Debug (bit) 0x01:error 0x02:probe 0x04:config" "Debug (bit) 0x01:error 0x02:probe 0x04:config"
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27) #define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27)
#endif #endif
#ifdef VIDEO_ADV_DEBUG #ifdef CONFIG_VIDEO_ADV_DEBUG
/* GSPCA our debug messages */ /* GSPCA our debug messages */
extern int gspca_debug; extern int gspca_debug;
#define PDEBUG(level, fmt, args...) \ #define PDEBUG(level, fmt, args...) \
......
...@@ -6432,7 +6432,7 @@ static void setcontrast(struct gspca_dev *gspca_dev) ...@@ -6432,7 +6432,7 @@ static void setcontrast(struct gspca_dev *gspca_dev)
0, Tgradient_1, Tgradient_2, 0, Tgradient_1, Tgradient_2,
Tgradient_3, Tgradient_4, Tgradient_5, Tgradient_6 Tgradient_3, Tgradient_4, Tgradient_5, Tgradient_6
}; };
#ifdef VIDEO_ADV_DEBUG #ifdef CONFIG_VIDEO_ADV_DEBUG
__u8 v[16]; __u8 v[16];
#endif #endif
...@@ -6450,7 +6450,7 @@ static void setcontrast(struct gspca_dev *gspca_dev) ...@@ -6450,7 +6450,7 @@ static void setcontrast(struct gspca_dev *gspca_dev)
else if (g <= 0) else if (g <= 0)
g = 1; g = 1;
reg_w(dev, g, 0x0120 + i); /* gamma */ reg_w(dev, g, 0x0120 + i); /* gamma */
#ifdef VIDEO_ADV_DEBUG #ifdef CONFIG_VIDEO_ADV_DEBUG
if (gspca_debug & D_CONF) if (gspca_debug & D_CONF)
v[i] = g; v[i] = g;
#endif #endif
...@@ -6470,7 +6470,7 @@ static void setcontrast(struct gspca_dev *gspca_dev) ...@@ -6470,7 +6470,7 @@ static void setcontrast(struct gspca_dev *gspca_dev)
g = 1; g = 1;
} }
reg_w(dev, g, 0x0130 + i); /* gradient */ reg_w(dev, g, 0x0130 + i); /* gradient */
#ifdef VIDEO_ADV_DEBUG #ifdef CONFIG_VIDEO_ADV_DEBUG
if (gspca_debug & D_CONF) if (gspca_debug & D_CONF)
v[i] = g; v[i] = g;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment