[linux-dvb] Patch 43 / 50: code cleanup for tvaudio

Uwe Bugla uwe.bugla at gmx.de
Fri Jun 23 17:35:04 CEST 2006


#Applies against: 2.6.17
#Signed-off-by: Uwe Bugla <uwe.bugla at gmx.de>
#Changes: wipe out uncommented material
--- a/drivers/media/video/tvaudio.c	2006-05-27 14:03:00
+++ b/drivers/media/video/tvaudio.c	2006-05-30 12:31:00
@@ -29,29 +29,18 @@
 #include <linux/i2c-algo-bit.h>
 #include <linux/init.h>
 #include <linux/smp_lock.h>
-
 #include <media/tvaudio.h>
 #include <media/v4l2-common.h>
-
 #include <media/i2c-addr.h>
-
-/* ---------------------------------------------------------------------- */
-/* insmod args                                                            */
-
 static int debug = 0;	/* insmod parameter */
 module_param(debug, int, 0644);
 
 MODULE_DESCRIPTION("device driver for various i2c TV sound decoder / audiomux chips");
 MODULE_AUTHOR("Eric Sandeen, Steve VanDeBogart, Greg Alexander, Gerd Knorr");
 MODULE_LICENSE("GPL");
 
 #define UNSET    (-1U)
-
-/* ---------------------------------------------------------------------- */
-/* our structs                                                            */
-
 #define MAXREGS 64
-
 struct CHIPSTATE;
 typedef int  (*getvalue)(int);
 typedef int  (*checkit)(struct CHIPSTATE*);
@@ -673,8 +662,6 @@
 static void tda9873_setmode(struct CHIPSTATE *chip, int mode)
 {
 	int sw_data  = chip->shadow.bytes[TDA9873_SW+1] & ~ TDA9873_TR_MASK;
-	/*	int adj_data = chip->shadow.bytes[TDA9873_AD+1] ; */
-
 	if ((sw_data & TDA9873_INP_MASK) != TDA9873_INTERNAL) {
 		v4l_dbg(1, debug, &chip->c, "tda9873_setmode(): external input\n");
 		return;
@@ -1167,7 +1154,6 @@
 #define TA8874Z_MODE_MAIN	0x01
 
 /* write 2nd byte */
-/*#define TA8874Z_TI	0x80  */ /* test mode */
 #define TA8874Z_SEPARATION	0x3f
 #define TA8874Z_SEPARATION_DEFAULT	0x10
 
@@ -1193,7 +1179,6 @@
 	}else if (!(val & TA8874Z_B0)){
 		mode |= VIDEO_SOUND_STEREO;
 	}
-	/* v4l_dbg(1, debug, &chip->c, "ta8874z_getmode(): raw chip read: 0x%02x, return: 0x%02x\n", val, mode); */
 	return mode;
 }
 
@@ -1452,7 +1437,6 @@
 	{
 		.name       = "ta8874z",
 		.id         = -1,
-		/*.id         = I2C_DRIVERID_TA8874Z, */
 		.checkit    = ta8874z_checkit,
 		.insmodopt  = &ta8874z,
 		.addr_lo    = I2C_ADDR_TDA9840 >> 1,
@@ -1619,7 +1603,6 @@
 	case AUDC_SET_RADIO:
 		chip->radio = 1;
 		chip->watch_stereo = 0;
-		/* del_timer(&chip->wt); */
 		break;
 
 	/* --- v4l ioctls --- */
@@ -1672,7 +1655,6 @@
 		}
 		if (desc->setmode && va->mode) {
 			chip->watch_stereo = 0;
-			/* del_timer(&chip->wt); */
 			chip->mode = va->mode;
 			desc->setmode(chip,va->mode);
 		}
@@ -1731,10 +1713,8 @@
 			return -EINVAL;
 		}
 		chip->audmode = vt->audmode;
-
 		if (desc->setmode && mode) {
 			chip->watch_stereo = 0;
-			/* del_timer(&chip->wt); */
 			chip->mode = mode;
 			desc->setmode(chip, mode);
 		}
@@ -1824,12 +1804,5 @@
 {
 	i2c_del_driver(&driver);
 }
-
 module_init(audiochip_init_module);
 module_exit(audiochip_cleanup_module);
-
-/*
- * Local variables:
- * c-basic-offset: 8
- * End:
- */

-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl



More information about the linux-dvb mailing list