forked from Minki/linux
V4L/DVB (8571): gspca: Don't use CONFIG_VIDEO_ADV_DEBUG as a compile option.
This option is changed to GSPCA_DEBUG and it is set by default in gspca.h. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
8f47a3cefb
commit
335b3f88f2
@ -123,7 +123,7 @@ static void reg_r(struct gspca_dev *gspca_dev,
|
|||||||
{
|
{
|
||||||
struct usb_device *dev = gspca_dev->dev;
|
struct usb_device *dev = gspca_dev->dev;
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
#ifdef GSPCA_DEBUG
|
||||||
if (len > sizeof gspca_dev->usb_buf) {
|
if (len > sizeof gspca_dev->usb_buf) {
|
||||||
err("reg_r: buffer overflow");
|
err("reg_r: buffer overflow");
|
||||||
return;
|
return;
|
||||||
@ -163,7 +163,7 @@ static void reg_w(struct gspca_dev *gspca_dev,
|
|||||||
{
|
{
|
||||||
struct usb_device *dev = gspca_dev->dev;
|
struct usb_device *dev = gspca_dev->dev;
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
#ifdef GSPCA_DEBUG
|
||||||
if (len > sizeof gspca_dev->usb_buf) {
|
if (len > sizeof gspca_dev->usb_buf) {
|
||||||
err("reg_w: buffer overflow");
|
err("reg_w: buffer overflow");
|
||||||
return;
|
return;
|
||||||
|
@ -233,7 +233,7 @@ static void reg_r(struct gspca_dev *gspca_dev,
|
|||||||
{
|
{
|
||||||
struct usb_device *dev = gspca_dev->dev;
|
struct usb_device *dev = gspca_dev->dev;
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
#ifdef GSPCA_DEBUG
|
||||||
if (len > sizeof gspca_dev->usb_buf) {
|
if (len > sizeof gspca_dev->usb_buf) {
|
||||||
err("reg_r: buffer overflow");
|
err("reg_r: buffer overflow");
|
||||||
return;
|
return;
|
||||||
@ -271,7 +271,7 @@ static void reg_w(struct gspca_dev *gspca_dev,
|
|||||||
{
|
{
|
||||||
struct usb_device *dev = gspca_dev->dev;
|
struct usb_device *dev = gspca_dev->dev;
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
#ifdef GSPCA_DEBUG
|
||||||
if (len > sizeof gspca_dev->usb_buf) {
|
if (len > sizeof gspca_dev->usb_buf) {
|
||||||
err("reg_w: buffer overflow");
|
err("reg_w: buffer overflow");
|
||||||
return;
|
return;
|
||||||
|
@ -47,7 +47,7 @@ MODULE_LICENSE("GPL");
|
|||||||
|
|
||||||
static int video_nr = -1;
|
static int video_nr = -1;
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
#ifdef GSPCA_DEBUG
|
||||||
int gspca_debug = D_ERR | D_PROBE;
|
int gspca_debug = D_ERR | D_PROBE;
|
||||||
EXPORT_SYMBOL(gspca_debug);
|
EXPORT_SYMBOL(gspca_debug);
|
||||||
|
|
||||||
@ -677,7 +677,7 @@ static int try_fmt_vid_cap(struct gspca_dev *gspca_dev,
|
|||||||
w = fmt->fmt.pix.width;
|
w = fmt->fmt.pix.width;
|
||||||
h = fmt->fmt.pix.height;
|
h = fmt->fmt.pix.height;
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
#ifdef GSPCA_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
|
||||||
@ -785,7 +785,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 CONFIG_VIDEO_ADV_DEBUG
|
#ifdef GSPCA_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;
|
||||||
@ -1080,7 +1080,7 @@ static int vidioc_streamon(struct file *file, void *priv,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
#ifdef GSPCA_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,
|
||||||
@ -1913,7 +1913,7 @@ static void __exit gspca_exit(void)
|
|||||||
module_init(gspca_init);
|
module_init(gspca_init);
|
||||||
module_exit(gspca_exit);
|
module_exit(gspca_exit);
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
#ifdef GSPCA_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"
|
||||||
|
@ -9,7 +9,10 @@
|
|||||||
#include <media/v4l2-common.h>
|
#include <media/v4l2-common.h>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
/* compilation option */
|
||||||
|
#define GSPCA_DEBUG 1
|
||||||
|
|
||||||
|
#ifdef GSPCA_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...) \
|
||||||
|
@ -408,7 +408,7 @@ static void reg_w(struct gspca_dev *gspca_dev,
|
|||||||
const __u8 *buffer,
|
const __u8 *buffer,
|
||||||
int len)
|
int len)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
#ifdef GSPCA_DEBUG
|
||||||
if (len > sizeof gspca_dev->usb_buf) {
|
if (len > sizeof gspca_dev->usb_buf) {
|
||||||
PDEBUG(D_ERR|D_PACK, "reg_w: buffer overflow");
|
PDEBUG(D_ERR|D_PACK, "reg_w: buffer overflow");
|
||||||
return;
|
return;
|
||||||
|
@ -6469,7 +6469,7 @@ static void setcontrast(struct gspca_dev *gspca_dev)
|
|||||||
NULL, Tgradient_1, Tgradient_2,
|
NULL, Tgradient_1, Tgradient_2,
|
||||||
Tgradient_3, Tgradient_4, Tgradient_5, Tgradient_6
|
Tgradient_3, Tgradient_4, Tgradient_5, Tgradient_6
|
||||||
};
|
};
|
||||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
#ifdef GSPCA_DEBUG
|
||||||
__u8 v[16];
|
__u8 v[16];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -6487,7 +6487,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 CONFIG_VIDEO_ADV_DEBUG
|
#ifdef GSPCA_DEBUG
|
||||||
if (gspca_debug & D_CONF)
|
if (gspca_debug & D_CONF)
|
||||||
v[i] = g;
|
v[i] = g;
|
||||||
#endif
|
#endif
|
||||||
@ -6507,7 +6507,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 CONFIG_VIDEO_ADV_DEBUG
|
#ifdef GSPCA_DEBUG
|
||||||
if (gspca_debug & D_CONF)
|
if (gspca_debug & D_CONF)
|
||||||
v[i] = g;
|
v[i] = g;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user