V4L/DVB (3347): Fixes some bad global variables

- Debug global var is already used inside kernel, so renamed
debug to tuner_debug for the tuner module

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 89d013c..f30ef79d 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -41,8 +41,8 @@
 static unsigned int show_i2c = 0;
 
 /* insmod options used at runtime => read/write */
-static unsigned int tuner_debug = 0;
-int debug = 0;
+static unsigned int tuner_debug_old = 0;
+int tuner_debug = 0;
 
 static unsigned int tv_range[2] = { 44, 958 };
 static unsigned int radio_range[2] = { 65, 108 };
@@ -51,13 +51,13 @@
 static char secam[] = "--";
 static char ntsc[] = "-";
 
+
 module_param(addr, int, 0444);
 module_param(no_autodetect, int, 0444);
 module_param(show_i2c, int, 0444);
 /* Note: tuner_debug is deprecated and will be removed in 2.6.17 */
-module_param(tuner_debug, int, 0444);
-module_param(debug, int, 0644);
-
+module_param_named(tuner_debug,tuner_debug_old, int, 0444);
+module_param_named(debug,tuner_debug, int, 0644);
 module_param_string(pal, pal, sizeof(pal), 0644);
 module_param_string(secam, secam, sizeof(secam), 0644);
 module_param_string(ntsc, ntsc, sizeof(ntsc), 0644);
@@ -419,8 +419,8 @@
 	t->radio_if2 = 10700 * 1000;	/* 10.7MHz - FM radio */
 	t->audmode = V4L2_TUNER_MODE_STEREO;
 	t->mode_mask = T_UNINITIALIZED;
-	if (tuner_debug) {
-		debug = tuner_debug;
+	if (tuner_debug_old) {
+		tuner_debug = tuner_debug_old;
 		printk(KERN_ERR "tuner: tuner_debug is deprecated and will be removed in 2.6.17.\n");
 		printk(KERN_ERR "tuner: use the debug option instead.\n");
 	}
@@ -551,7 +551,7 @@
 {
 	struct tuner *t = i2c_get_clientdata(client);
 
-	if (debug>1)
+	if (tuner_debug>1)
 		v4l_i2c_print_ioctl(&(t->i2c),cmd);
 
 	switch (cmd) {