diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2006-01-11 18:54:24 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2006-01-11 18:54:24 +0000 |
commit | 40aca7dd04e8f2d3e3a8cddd5d3d8c3d596c978f (patch) | |
tree | 63869cf90ecd5784572d76baabf8bd0634f5b1b2 /linux/drivers/media/video/tvaudio.c | |
parent | aeb66d031adc973bc997fe5edff81a6dd8ebfc17 (diff) | |
download | mediapointer-dvb-s2-40aca7dd04e8f2d3e3a8cddd5d3d8c3d596c978f.tar.gz mediapointer-dvb-s2-40aca7dd04e8f2d3e3a8cddd5d3d8c3d596c978f.tar.bz2 |
Fixes some bad global variables
From: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
- debug global var is already used inside kernel.
- v4l_dbg now expects the debug var
- global vars inside msp34xx renamed to msp_*
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video/tvaudio.c')
-rw-r--r-- | linux/drivers/media/video/tvaudio.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c index 5de17e25f..35584f1d6 100644 --- a/linux/drivers/media/video/tvaudio.c +++ b/linux/drivers/media/video/tvaudio.c @@ -167,7 +167,7 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val) unsigned char buffer[2]; if (-1 == subaddr) { - v4l_dbg(1, &chip->c, "%s: chip_write: 0x%x\n", + v4l_dbg(1, debug, &chip->c, "%s: chip_write: 0x%x\n", chip->c.name, val); chip->shadow.bytes[1] = val; buffer[0] = val; @@ -177,7 +177,7 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val) return -1; } } else { - v4l_dbg(1, &chip->c, "%s: chip_write: reg%d=0x%x\n", + v4l_dbg(1, debug, &chip->c, "%s: chip_write: reg%d=0x%x\n", chip->c.name, subaddr, val); chip->shadow.bytes[subaddr+1] = val; buffer[0] = subaddr; @@ -212,7 +212,7 @@ static int chip_read(struct CHIPSTATE *chip) chip->c.name); return -1; } - v4l_dbg(1, &chip->c, "%s: chip_read: 0x%x\n",chip->c.name, buffer); + v4l_dbg(1, debug, &chip->c, "%s: chip_read: 0x%x\n",chip->c.name, buffer); return buffer; } @@ -230,7 +230,7 @@ static int chip_read2(struct CHIPSTATE *chip, int subaddr) v4l_warn(&chip->c, "%s: I/O error (read2)\n", chip->c.name); return -1; } - v4l_dbg(1, &chip->c, "%s: chip_read2: reg%d=0x%x\n", + v4l_dbg(1, debug, &chip->c, "%s: chip_read2: reg%d=0x%x\n", chip->c.name, subaddr,read[0]); return read[0]; } @@ -243,7 +243,7 @@ static int chip_cmd(struct CHIPSTATE *chip, char *name, audiocmd *cmd) return 0; /* update our shadow register set; print bytes if (debug > 0) */ - v4l_dbg(1, &chip->c, "%s: chip_cmd(%s): reg=%d, data:", + v4l_dbg(1, debug, &chip->c, "%s: chip_cmd(%s): reg=%d, data:", chip->c.name, name,cmd->bytes[0]); for (i = 1; i < cmd->count; i++) { if (debug) @@ -286,7 +286,7 @@ static int chip_thread(void *data) daemonize(); #endif allow_signal(SIGTERM); - v4l_dbg(1, &chip->c, "%s: thread started\n", chip->c.name); + v4l_dbg(1, debug, &chip->c, "%s: thread started\n", chip->c.name); for (;;) { add_wait_queue(&chip->wq, &wait); @@ -300,7 +300,7 @@ static int chip_thread(void *data) #endif if (chip->done || signal_pending(current)) break; - v4l_dbg(1, &chip->c, "%s: thread wakeup\n", chip->c.name); + v4l_dbg(1, debug, &chip->c, "%s: thread wakeup\n", chip->c.name); /* don't do anything for radio or if mode != auto */ if (chip->radio || chip->mode != 0) @@ -313,7 +313,7 @@ static int chip_thread(void *data) mod_timer(&chip->wt, jiffies+2*HZ); } - v4l_dbg(1, &chip->c, "%s: thread exiting\n", chip->c.name); + v4l_dbg(1, debug, &chip->c, "%s: thread exiting\n", chip->c.name); complete_and_exit(&chip->texit, 0); return 0; } @@ -326,7 +326,7 @@ static void generic_checkmode(struct CHIPSTATE *chip) if (mode == chip->prevmode) return; - v4l_dbg(1, &chip->c, "%s: thread checkmode\n", chip->c.name); + v4l_dbg(1, debug, &chip->c, "%s: thread checkmode\n", chip->c.name); chip->prevmode = mode; if (mode & VIDEO_SOUND_STEREO) @@ -373,7 +373,7 @@ static int tda9840_getmode(struct CHIPSTATE *chip) if (val & TDA9840_ST_STEREO) mode |= VIDEO_SOUND_STEREO; - v4l_dbg(1, &chip->c, "tda9840_getmode(): raw chip read: %d, return: %d\n", + v4l_dbg(1, debug, &chip->c, "tda9840_getmode(): raw chip read: %d, return: %d\n", val, mode); return mode; } @@ -669,7 +669,7 @@ static int tda9873_getmode(struct CHIPSTATE *chip) mode |= VIDEO_SOUND_STEREO; if (val & TDA9873_DUAL) mode |= VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; - v4l_dbg(1, &chip->c, "tda9873_getmode(): raw chip read: %d, return: %d\n", + v4l_dbg(1, debug, &chip->c, "tda9873_getmode(): raw chip read: %d, return: %d\n", val, mode); return mode; } @@ -680,12 +680,12 @@ static void tda9873_setmode(struct CHIPSTATE *chip, int mode) /* int adj_data = chip->shadow.bytes[TDA9873_AD+1] ; */ if ((sw_data & TDA9873_INP_MASK) != TDA9873_INTERNAL) { - v4l_dbg(1, &chip->c, "tda9873_setmode(): external input\n"); + v4l_dbg(1, debug, &chip->c, "tda9873_setmode(): external input\n"); return; } - v4l_dbg(1, &chip->c, "tda9873_setmode(): chip->shadow.bytes[%d] = %d\n", TDA9873_SW+1, chip->shadow.bytes[TDA9873_SW+1]); - v4l_dbg(1, &chip->c, "tda9873_setmode(): sw_data = %d\n", sw_data); + v4l_dbg(1, debug, &chip->c, "tda9873_setmode(): chip->shadow.bytes[%d] = %d\n", TDA9873_SW+1, chip->shadow.bytes[TDA9873_SW+1]); + v4l_dbg(1, debug, &chip->c, "tda9873_setmode(): sw_data = %d\n", sw_data); switch (mode) { case VIDEO_SOUND_MONO: @@ -706,7 +706,7 @@ static void tda9873_setmode(struct CHIPSTATE *chip, int mode) } chip_write(chip, TDA9873_SW, sw_data); - v4l_dbg(1, &chip->c, "tda9873_setmode(): req. mode %d; chip_write: %d\n", + v4l_dbg(1, debug, &chip->c, "tda9873_setmode(): req. mode %d; chip_write: %d\n", mode, sw_data); } @@ -845,7 +845,7 @@ static int tda9874a_setup(struct CHIPSTATE *chip) chip_write(chip, TDA9874A_SDACOSR, (tda9874a_mode) ? 0x81:0x80); chip_write(chip, TDA9874A_AOSR, 0x00); /* or 0x10 */ } - v4l_dbg(1, &chip->c, "tda9874a_setup(): %s [0x%02X].\n", + v4l_dbg(1, debug, &chip->c, "tda9874a_setup(): %s [0x%02X].\n", tda9874a_modelist[tda9874a_STD].name,tda9874a_STD); return 1; } @@ -893,7 +893,7 @@ static int tda9874a_getmode(struct CHIPSTATE *chip) mode |= VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; } - v4l_dbg(1, &chip->c, "tda9874a_getmode(): DSR=0x%X, NSR=0x%X, NECR=0x%X, return: %d.\n", + v4l_dbg(1, debug, &chip->c, "tda9874a_getmode(): DSR=0x%X, NSR=0x%X, NECR=0x%X, return: %d.\n", dsr, nsr, necr, mode); return mode; } @@ -939,7 +939,7 @@ static void tda9874a_setmode(struct CHIPSTATE *chip, int mode) chip_write(chip, TDA9874A_AOSR, aosr); chip_write(chip, TDA9874A_MDACOSR, mdacosr); - v4l_dbg(1, &chip->c, "tda9874a_setmode(): req. mode %d; AOSR=0x%X, MDACOSR=0x%X.\n", + v4l_dbg(1, debug, &chip->c, "tda9874a_setmode(): req. mode %d; AOSR=0x%X, MDACOSR=0x%X.\n", mode, aosr, mdacosr); } else { /* dic == 0x07 */ @@ -974,7 +974,7 @@ static void tda9874a_setmode(struct CHIPSTATE *chip, int mode) chip_write(chip, TDA9874A_FMMR, fmmr); chip_write(chip, TDA9874A_AOSR, aosr); - v4l_dbg(1, &chip->c, "tda9874a_setmode(): req. mode %d; FMMR=0x%X, AOSR=0x%X.\n", + v4l_dbg(1, debug, &chip->c, "tda9874a_setmode(): req. mode %d; FMMR=0x%X, AOSR=0x%X.\n", mode, fmmr, aosr); } } @@ -988,7 +988,7 @@ static int tda9874a_checkit(struct CHIPSTATE *chip) if(-1 == (sic = chip_read2(chip,TDA9874A_SIC))) return 0; - v4l_dbg(1, &chip->c, "tda9874a_checkit(): DIC=0x%X, SIC=0x%X.\n", dic, sic); + v4l_dbg(1, debug, &chip->c, "tda9874a_checkit(): DIC=0x%X, SIC=0x%X.\n", dic, sic); if((dic == 0x11)||(dic == 0x07)) { v4l_info(&chip->c, "found tda9874%s.\n", (dic == 0x11) ? "a":"h"); @@ -1203,7 +1203,7 @@ static int ta8874z_getmode(struct CHIPSTATE *chip) }else if (!(val & TA8874Z_B0)){ mode |= VIDEO_SOUND_STEREO; } - /* v4l_dbg(1, &chip->c, "ta8874z_getmode(): raw chip read: 0x%02x, return: 0x%02x\n", val, mode); */ + /* v4l_dbg(1, debug, &chip->c, "ta8874z_getmode(): raw chip read: 0x%02x, return: 0x%02x\n", val, mode); */ return mode; } @@ -1216,7 +1216,7 @@ static void ta8874z_setmode(struct CHIPSTATE *chip, int mode) { int update = 1; audiocmd *t = NULL; - v4l_dbg(1, &chip->c, "ta8874z_setmode(): mode: 0x%02x\n", mode); + v4l_dbg(1, debug, &chip->c, "ta8874z_setmode(): mode: 0x%02x\n", mode); switch(mode){ case VIDEO_SOUND_MONO: @@ -1502,7 +1502,7 @@ static int chip_attach(struct i2c_adapter *adap, int addr, i2c_set_clientdata(&chip->c, chip); /* find description for the chip */ - v4l_dbg(1, &chip->c, "chip found @ 0x%x\n", addr<<1); + v4l_dbg(1, debug, &chip->c, "chip found @ 0x%x\n", addr<<1); for (desc = chiplist; desc->name != NULL; desc++) { if (0 == *(desc->insmodopt)) continue; @@ -1514,12 +1514,12 @@ static int chip_attach(struct i2c_adapter *adap, int addr, break; } if (desc->name == NULL) { - v4l_dbg(1, &chip->c, "no matching chip description found\n"); + v4l_dbg(1, debug, &chip->c, "no matching chip description found\n"); return -EIO; } v4l_info(&chip->c, "%s found @ 0x%x (%s)\n", desc->name, addr<<1, adap->name); if (desc->flags) { - v4l_dbg(1, &chip->c, "matches:%s%s%s.\n", + v4l_dbg(1, debug, &chip->c, "matches:%s%s%s.\n", (desc->flags & CHIP_HAS_VOLUME) ? " volume" : "", (desc->flags & CHIP_HAS_BASSTREBLE) ? " bass/treble" : "", (desc->flags & CHIP_HAS_INPUTSEL) ? " audiomux" : ""); @@ -1624,7 +1624,7 @@ static int chip_command(struct i2c_client *client, struct CHIPSTATE *chip = i2c_get_clientdata(client); struct CHIPDESC *desc = chiplist + chip->type; - v4l_dbg(1, &chip->c, "%s: chip_command 0x%x\n", chip->c.name, cmd); + v4l_dbg(1, debug, &chip->c, "%s: chip_command 0x%x\n", chip->c.name, cmd); switch (cmd) { case AUDC_SET_INPUT: |