···782782 bcm3510_register_value v;783783784784 /* allocate memory for the internal state */785785- state = kmalloc(sizeof(struct bcm3510_state), GFP_KERNEL);785785+ state = kzalloc(sizeof(struct bcm3510_state), GFP_KERNEL);786786 if (state == NULL)787787 goto error;788788- memset(state,0,sizeof(struct bcm3510_state));789788790789 /* setup the state */791790
+1-2
drivers/media/dvb/frontends/dib3000mb.c
···700700 struct dib3000_state* state = NULL;701701702702 /* allocate memory for the internal state */703703- state = kmalloc(sizeof(struct dib3000_state), GFP_KERNEL);703703+ state = kzalloc(sizeof(struct dib3000_state), GFP_KERNEL);704704 if (state == NULL)705705 goto error;706706- memset(state,0,sizeof(struct dib3000_state));707706708707 /* setup the state */709708 state->i2c = i2c;
+1-2
drivers/media/dvb/frontends/dib3000mc.c
···832832 u16 devid;833833834834 /* allocate memory for the internal state */835835- state = kmalloc(sizeof(struct dib3000_state), GFP_KERNEL);835835+ state = kzalloc(sizeof(struct dib3000_state), GFP_KERNEL);836836 if (state == NULL)837837 goto error;838838- memset(state,0,sizeof(struct dib3000_state));839838840839 /* setup the state */841840 state->i2c = i2c;
···714714 u8 buf[1];715715716716 /* Allocate memory for the internal state */717717- state = (struct lgdt330x_state*) kmalloc(sizeof(struct lgdt330x_state), GFP_KERNEL);717717+ state = kzalloc(sizeof(struct lgdt330x_state), GFP_KERNEL);718718 if (state == NULL)719719 goto error;720720- memset(state,0,sizeof(*state));721720722721 /* Setup the state */723722 state->config = config;
+1-2
drivers/media/dvb/frontends/mt352.c
···535535 struct mt352_state* state = NULL;536536537537 /* allocate memory for the internal state */538538- state = kmalloc(sizeof(struct mt352_state), GFP_KERNEL);538538+ state = kzalloc(sizeof(struct mt352_state), GFP_KERNEL);539539 if (state == NULL) goto error;540540- memset(state,0,sizeof(*state));541540542541 /* setup the state */543542 state->i2c = i2c;
+1-2
drivers/media/dvb/frontends/nxt200x.c
···11101110 u8 buf [] = {0,0,0,0,0};1111111111121112 /* allocate memory for the internal state */11131113- state = (struct nxt200x_state*) kmalloc(sizeof(struct nxt200x_state), GFP_KERNEL);11131113+ state = kzalloc(sizeof(struct nxt200x_state), GFP_KERNEL);11141114 if (state == NULL)11151115 goto error;11161116- memset(state,0,sizeof(*state));1117111611181117 /* setup the state */11191118 state->config = config;
+1-2
drivers/media/dvb/pluto2/pluto2.c
···584584 struct dmx_demux *dmx;585585 int ret = -ENOMEM;586586587587- pluto = kmalloc(sizeof(struct pluto), GFP_KERNEL);587587+ pluto = kzalloc(sizeof(struct pluto), GFP_KERNEL);588588 if (!pluto)589589 goto out;590590591591- memset(pluto, 0, sizeof(struct pluto));592591 pluto->pdev = pdev;593592594593 ret = pci_enable_device(pdev);
···183183 help184184 Say Y here to enable support for the Stradis 4:2:2 MPEG-2 video185185 driver for PCI. There is a product page at186186- <http://www.stradis.com/decoder.html>.186186+ <http://www.stradis.com/>.187187188188config VIDEO_ZORAN189189 tristate "Zoran ZR36057/36067 Video For Linux"
···657657 goto fail_core;658658659659 err = -ENOMEM;660660- dev = kmalloc(sizeof(*dev),GFP_KERNEL);660660+ dev = kzalloc(sizeof(*dev),GFP_KERNEL);661661 if (NULL == dev)662662 goto fail_core;663663- memset(dev,0,sizeof(*dev));664663 dev->pci = pci_dev;665664 dev->core = core;666665
+1
drivers/media/video/cx88/cx88-input.c
···697697 case CX88_BOARD_HAUPPAUGE_DVB_T1:698698 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:699699 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:700700+ case CX88_BOARD_HAUPPAUGE_HVR1100:700701 ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7);701702 ir_dprintk("biphase decoded: %x\n", ircode);702703 if ((ircode & 0xfffff000) != 0x3000)
+2-4
drivers/media/video/cx88/cx88-video.c
···750750 minor,radio,v4l2_type_names[type]);751751752752 /* allocate + initialize per filehandle data */753753- fh = kmalloc(sizeof(*fh),GFP_KERNEL);753753+ fh = kzalloc(sizeof(*fh),GFP_KERNEL);754754 if (NULL == fh)755755 return -ENOMEM;756756- memset(fh,0,sizeof(*fh));757756 file->private_data = fh;758757 fh->dev = dev;759758 fh->radio = radio;···18081809 struct cx88_core *core;18091810 int err;1810181118111811- dev = kmalloc(sizeof(*dev),GFP_KERNEL);18121812+ dev = kzalloc(sizeof(*dev),GFP_KERNEL);18121813 if (NULL == dev)18131814 return -ENOMEM;18141814- memset(dev,0,sizeof(*dev));1815181518161816 /* pci init */18171817 dev->pci = pci_dev;
+1-2
drivers/media/video/dpc7146.c
···9494 struct i2c_client *client;9595 struct list_head *item;96969797- dpc = (struct dpc*)kmalloc(sizeof(struct dpc), GFP_KERNEL);9797+ dpc = kzalloc(sizeof(struct dpc), GFP_KERNEL);9898 if( NULL == dpc ) {9999 printk("dpc_v4l2.o: dpc_probe: not enough kernel memory.\n");100100 return -ENOMEM;101101 }102102- memset(dpc, 0x0, sizeof(struct dpc)); 103102104103 /* FIXME: enable i2c-port pins, video-port-pins105104 video port pins should be enabled here ?! */
+1-2
drivers/media/video/em28xx/em28xx-video.c
···18611861 }1862186218631863 /* allocate memory for our device state and initialize it */18641864- dev = kmalloc(sizeof(*dev), GFP_KERNEL);18641864+ dev = kzalloc(sizeof(*dev), GFP_KERNEL);18651865 if (dev == NULL) {18661866 em28xx_err(DRIVER_NAME ": out of memory!\n");18671867 return -ENOMEM;18681868 }18691869- memset(dev, 0, sizeof(*dev));1870186918711870 /* compute alternate max packet sizes */18721871 uif = udev->actconfig->interface[0];
···66666767/* module parameters */6868static int opmode = OPMODE_AUTO;6969-int debug = 0; /* debug output */7070-int once = 0; /* no continous stereo monitoring */7171-int amsound = 0; /* hard-wire AM sound at 6.5 Hz (france),6969+int msp_debug = 0; /* msp_debug output */7070+int msp_once = 0; /* no continous stereo monitoring */7171+int msp_amsound = 0; /* hard-wire AM sound at 6.5 Hz (france),7272 the autoscan seems work well only with FM... */7373-int standard = 1; /* Override auto detect of audio standard, if needed. */7474-int dolby = 0;7373+int msp_standard = 1; /* Override auto detect of audio msp_standard, if needed. */7474+int msp_dolby = 0;75757676-int stereo_threshold = 0x190; /* a2 threshold for stereo/bilingual7676+int msp_stereo_thresh = 0x190; /* a2 threshold for stereo/bilingual7777 (msp34xxg only) 0x00a0-0x03c0 */78787979/* read-only */8080module_param(opmode, int, 0444);81818282/* read-write */8383-module_param(once, bool, 0644);8484-module_param(debug, int, 0644);8585-module_param(stereo_threshold, int, 0644);8686-module_param(standard, int, 0644);8787-module_param(amsound, bool, 0644);8888-module_param(dolby, bool, 0644);8383+module_param_named(once,msp_once, bool, 0644);8484+module_param_named(debug,msp_debug, int, 0644);8585+module_param_named(stereo_threshold,msp_stereo_thresh, int, 0644);8686+module_param_named(standard,msp_standard, int, 0644);8787+module_param_named(amsound,msp_amsound, bool, 0644);8888+module_param_named(dolby,msp_dolby, bool, 0644);89899090MODULE_PARM_DESC(opmode, "Forces a MSP3400 opmode. 0=Manual, 1=Autodetect, 2=Autodetect and autoselect");9191MODULE_PARM_DESC(once, "No continuous stereo monitoring");···127127 { client->addr, I2C_M_RD, 2, read },128128 };129129130130- v4l_dbg(3, client, "msp_reset\n");130130+ v4l_dbg(3, msp_debug, client, "msp_reset\n");131131 if (i2c_transfer(client->adapter, &reset[0], 1) != 1 ||132132 i2c_transfer(client->adapter, &reset[1], 1) != 1 ||133133 i2c_transfer(client->adapter, test, 2) != 2) {···165165 return -1;166166 }167167 retval = read[0] << 8 | read[1];168168- v4l_dbg(3, client, "msp_read(0x%x, 0x%x): 0x%x\n", dev, addr, retval);168168+ v4l_dbg(3, msp_debug, client, "msp_read(0x%x, 0x%x): 0x%x\n", dev, addr, retval);169169 return retval;170170}171171···190190 buffer[3] = val >> 8;191191 buffer[4] = val & 0xff;192192193193- v4l_dbg(3, client, "msp_write(0x%x, 0x%x, 0x%x)\n", dev, addr, val);193193+ v4l_dbg(3, msp_debug, client, "msp_write(0x%x, 0x%x, 0x%x)\n", dev, addr, val);194194 for (err = 0; err < 3; err++) {195195 if (i2c_master_send(client, buffer, 5) == 5)196196 break;···273273 } else274274 state->acb = 0xf60; /* Mute Input and SCART 1 Output */275275276276- v4l_dbg(1, client, "scart switch: %s => %d (ACB=0x%04x)\n",276276+ v4l_dbg(1, msp_debug, client, "scart switch: %s => %d (ACB=0x%04x)\n",277277 scart_names[in], out, state->acb);278278 msp_write_dsp(client, 0x13, state->acb);279279···285285{286286 struct msp_state *state = i2c_get_clientdata(client);287287288288- v4l_dbg(1, client, "mute audio\n");288288+ v4l_dbg(1, msp_debug, client, "mute audio\n");289289 msp_write_dsp(client, 0x0000, 0);290290 msp_write_dsp(client, 0x0007, 1);291291 if (state->has_scart2_out_volume)···303303 if (!state->muted)304304 val = (state->volume * 0x7f / 65535) << 8;305305306306- v4l_dbg(1, client, "mute=%s volume=%d\n",306306+ v4l_dbg(1, msp_debug, client, "mute=%s volume=%d\n",307307 state->muted ? "on" : "off", state->volume);308308309309 msp_write_dsp(client, 0x0000, val);···321321 treble = ((state->treble - 32768) * 0x60 / 65535) << 8;322322 loudness = state->loudness ? ((5 * 4) << 8) : 0;323323324324- v4l_dbg(1, client, "balance=%d bass=%d treble=%d loudness=%d\n",324324+ v4l_dbg(1, msp_debug, client, "balance=%d bass=%d treble=%d loudness=%d\n",325325 state->balance, state->bass, state->treble, state->loudness);326326327327 msp_write_dsp(client, 0x0001, bal << 8);···341341 struct msp_state *state = i2c_get_clientdata(client);342342343343 if (state->radio) {344344- v4l_dbg(1, client, "video mode selected to Radio\n");344344+ v4l_dbg(1, msp_debug, client, "video mode selected to Radio\n");345345 return 0x0003;346346 }347347348348 if (state->v4l2_std & V4L2_STD_PAL) {349349- v4l_dbg(1, client, "video mode selected to PAL\n");349349+ v4l_dbg(1, msp_debug, client, "video mode selected to PAL\n");350350351351#if 1352352 /* experimental: not sure this works with all chip versions */···357357#endif358358 }359359 if (state->v4l2_std & V4L2_STD_NTSC) {360360- v4l_dbg(1, client, "video mode selected to NTSC\n");360360+ v4l_dbg(1, msp_debug, client, "video mode selected to NTSC\n");361361 return 0x2003;362362 }363363 if (state->v4l2_std & V4L2_STD_SECAM) {364364- v4l_dbg(1, client, "video mode selected to SECAM\n");364364+ v4l_dbg(1, msp_debug, client, "video mode selected to SECAM\n");365365 return 0x0003;366366 }367367 return 0x0003;···619619 u16 *sarg = arg;620620 int scart = 0;621621622622- if (debug >= 2)622622+ if (msp_debug >= 2)623623 v4l_i2c_print_ioctl(client, cmd);624624625625 switch (cmd) {···666666 if (state->radio)667667 return 0;668668 state->radio = 1;669669- v4l_dbg(1, client, "switching to radio mode\n");669669+ v4l_dbg(1, msp_debug, client, "switching to radio mode\n");670670 state->watch_stereo = 0;671671 switch (state->opmode) {672672 case OPMODE_MANUAL:···937937 if (a->index < 0 || a->index > 2)938938 return -EINVAL;939939940940- v4l_dbg(1, client, "Setting audio out on msp34xx to input %i\n", a->index);940940+ v4l_dbg(1, msp_debug, client, "Setting audio out on msp34xx to input %i\n", a->index);941941 msp_set_scart(client, state->in_scart, a->index + 1);942942943943 break;···947947 {948948 u32 *a = (u32 *)arg;949949950950- v4l_dbg(1, client, "Setting I2S speed to %d\n", *a);950950+ v4l_dbg(1, msp_debug, client, "Setting I2S speed to %d\n", *a);951951952952 switch (*a) {953953 case 1024000:···10411041{10421042 struct i2c_client *client = container_of(dev, struct i2c_client, dev);1043104310441044- v4l_dbg(1, client, "suspend\n");10441044+ v4l_dbg(1, msp_debug, client, "suspend\n");10451045 msp_reset(client);10461046 return 0;10471047}···10501050{10511051 struct i2c_client *client = container_of(dev, struct i2c_client, dev);1052105210531053- v4l_dbg(1, client, "resume\n");10531053+ v4l_dbg(1, msp_debug, client, "resume\n");10541054 msp_wake_thread(client);10551055 return 0;10561056}···10801080 snprintf(client->name, sizeof(client->name) - 1, "msp3400");1081108110821082 if (msp_reset(client) == -1) {10831083- v4l_dbg(1, client, "msp3400 not found\n");10831083+ v4l_dbg(1, msp_debug, client, "msp3400 not found\n");10841084 kfree(client);10851085 return -1;10861086 }···11071107 state->rev1 = msp_read_dsp(client, 0x1e);11081108 if (state->rev1 != -1)11091109 state->rev2 = msp_read_dsp(client, 0x1f);11101110- v4l_dbg(1, client, "rev1=0x%04x, rev2=0x%04x\n", state->rev1, state->rev2);11101110+ v4l_dbg(1, msp_debug, client, "rev1=0x%04x, rev2=0x%04x\n", state->rev1, state->rev2);11111111 if (state->rev1 == -1 || (state->rev1 == 0 && state->rev2 == 0)) {11121112- v4l_dbg(1, client, "not an msp3400 (cannot read chip version)\n");11121112+ v4l_dbg(1, msp_debug, client, "not an msp3400 (cannot read chip version)\n");11131113 kfree(state);11141114 kfree(client);11151115 return -1;
+62-62
drivers/media/video/msp3400-kthreads.c
···168168 struct msp_state *state = i2c_get_clientdata(client);169169 int i;170170171171- v4l_dbg(1, client, "setmode: %d\n", type);171171+ v4l_dbg(1, msp_debug, client, "setmode: %d\n", type);172172 state->mode = type;173173 state->audmode = V4L2_TUNER_MODE_MONO;174174 state->rxsubchans = V4L2_TUNER_SUB_MONO;···191191192192 msp_write_dem(client, 0x0056, 0); /*LOAD_REG_1/2*/193193194194- if (dolby) {194194+ if (msp_dolby) {195195 msp_write_dsp(client, 0x0008, 0x0520); /* I2S1 */196196 msp_write_dsp(client, 0x0009, 0x0620); /* I2S2 */197197 msp_write_dsp(client, 0x000b, msp3400c_init_data[type].dsp_src);···221221 /* this method would break everything, let's make sure222222 * it's never called223223 */224224- v4l_dbg(1, client, "setstereo called with mode=%d instead of set_source (ignored)\n",224224+ v4l_dbg(1, msp_debug, client, "setstereo called with mode=%d instead of set_source (ignored)\n",225225 mode);226226 return;227227 }···229229 /* switch demodulator */230230 switch (state->mode) {231231 case MSP_MODE_FM_TERRA:232232- v4l_dbg(1, client, "FM setstereo: %s\n", strmode[mode]);232232+ v4l_dbg(1, msp_debug, client, "FM setstereo: %s\n", strmode[mode]);233233 msp3400c_setcarrier(client, state->second, state->main);234234 switch (mode) {235235 case V4L2_TUNER_MODE_STEREO:···243243 }244244 break;245245 case MSP_MODE_FM_SAT:246246- v4l_dbg(1, client, "SAT setstereo: %s\n", strmode[mode]);246246+ v4l_dbg(1, msp_debug, client, "SAT setstereo: %s\n", strmode[mode]);247247 switch (mode) {248248 case V4L2_TUNER_MODE_MONO:249249 msp3400c_setcarrier(client, MSP_CARRIER(6.5), MSP_CARRIER(6.5));···262262 case MSP_MODE_FM_NICAM1:263263 case MSP_MODE_FM_NICAM2:264264 case MSP_MODE_AM_NICAM:265265- v4l_dbg(1, client, "NICAM setstereo: %s\n",strmode[mode]);265265+ v4l_dbg(1, msp_debug, client, "NICAM setstereo: %s\n",strmode[mode]);266266 msp3400c_setcarrier(client,state->second,state->main);267267 if (state->nicam_on)268268 nicam=0x0100;269269 break;270270 case MSP_MODE_BTSC:271271- v4l_dbg(1, client, "BTSC setstereo: %s\n",strmode[mode]);271271+ v4l_dbg(1, msp_debug, client, "BTSC setstereo: %s\n",strmode[mode]);272272 nicam=0x0300;273273 break;274274 case MSP_MODE_EXTERN:275275- v4l_dbg(1, client, "extern setstereo: %s\n",strmode[mode]);275275+ v4l_dbg(1, msp_debug, client, "extern setstereo: %s\n",strmode[mode]);276276 nicam = 0x0200;277277 break;278278 case MSP_MODE_FM_RADIO:279279- v4l_dbg(1, client, "FM-Radio setstereo: %s\n",strmode[mode]);279279+ v4l_dbg(1, msp_debug, client, "FM-Radio setstereo: %s\n",strmode[mode]);280280 break;281281 default:282282- v4l_dbg(1, client, "mono setstereo\n");282282+ v4l_dbg(1, msp_debug, client, "mono setstereo\n");283283 return;284284 }285285···290290 break;291291 case V4L2_TUNER_MODE_MONO:292292 if (state->mode == MSP_MODE_AM_NICAM) {293293- v4l_dbg(1, client, "switching to AM mono\n");293293+ v4l_dbg(1, msp_debug, client, "switching to AM mono\n");294294 /* AM mono decoding is handled by tuner, not MSP chip */295295 /* SCART switching control register */296296 msp_set_scart(client, SCART_MONO, 0);···304304 src = 0x0010 | nicam;305305 break;306306 }307307- v4l_dbg(1, client, "setstereo final source/matrix = 0x%x\n", src);307307+ v4l_dbg(1, msp_debug, client, "setstereo final source/matrix = 0x%x\n", src);308308309309- if (dolby) {309309+ if (msp_dolby) {310310 msp_write_dsp(client, 0x0008, 0x0520);311311 msp_write_dsp(client, 0x0009, 0x0620);312312 msp_write_dsp(client, 0x000a, src);···327327 struct msp_state *state = i2c_get_clientdata(client);328328329329 if (state->main == state->second) {330330- v4l_dbg(1, client, "mono sound carrier: %d.%03d MHz\n",330330+ v4l_dbg(1, msp_debug, client, "mono sound carrier: %d.%03d MHz\n",331331 state->main / 910000, (state->main / 910) % 1000);332332 } else {333333- v4l_dbg(1, client, "main sound carrier: %d.%03d MHz\n",333333+ v4l_dbg(1, msp_debug, client, "main sound carrier: %d.%03d MHz\n",334334 state->main / 910000, (state->main / 910) % 1000);335335 }336336 if (state->mode == MSP_MODE_FM_NICAM1 || state->mode == MSP_MODE_FM_NICAM2)337337- v4l_dbg(1, client, "NICAM/FM carrier : %d.%03d MHz\n",337337+ v4l_dbg(1, msp_debug, client, "NICAM/FM carrier : %d.%03d MHz\n",338338 state->second / 910000, (state->second/910) % 1000);339339 if (state->mode == MSP_MODE_AM_NICAM)340340- v4l_dbg(1, client, "NICAM/AM carrier : %d.%03d MHz\n",340340+ v4l_dbg(1, msp_debug, client, "NICAM/AM carrier : %d.%03d MHz\n",341341 state->second / 910000, (state->second / 910) % 1000);342342 if (state->mode == MSP_MODE_FM_TERRA && state->main != state->second) {343343- v4l_dbg(1, client, "FM-stereo carrier : %d.%03d MHz\n",343343+ v4l_dbg(1, msp_debug, client, "FM-stereo carrier : %d.%03d MHz\n",344344 state->second / 910000, (state->second / 910) % 1000);345345 }346346}···360360 val = msp_read_dsp(client, 0x18);361361 if (val > 32767)362362 val -= 65536;363363- v4l_dbg(2, client, "stereo detect register: %d\n", val);363363+ v4l_dbg(2, msp_debug, client, "stereo detect register: %d\n", val);364364 if (val > 4096) {365365 rxsubchans = V4L2_TUNER_SUB_STEREO | V4L2_TUNER_SUB_MONO;366366 } else if (val < -4096) {···374374 case MSP_MODE_FM_NICAM2:375375 case MSP_MODE_AM_NICAM:376376 val = msp_read_dem(client, 0x23);377377- v4l_dbg(2, client, "nicam sync=%d, mode=%d\n",377377+ v4l_dbg(2, msp_debug, client, "nicam sync=%d, mode=%d\n",378378 val & 1, (val & 0x1e) >> 1);379379380380 if (val & 1) {···407407 break;408408 case MSP_MODE_BTSC:409409 val = msp_read_dem(client, 0x200);410410- v4l_dbg(2, client, "status=0x%x (pri=%s, sec=%s, %s%s%s)\n",410410+ v4l_dbg(2, msp_debug, client, "status=0x%x (pri=%s, sec=%s, %s%s%s)\n",411411 val,412412 (val & 0x0002) ? "no" : "yes",413413 (val & 0x0004) ? "no" : "yes",···421421 }422422 if (rxsubchans != state->rxsubchans) {423423 update = 1;424424- v4l_dbg(1, client, "watch: rxsubchans %d => %d\n",424424+ v4l_dbg(1, msp_debug, client, "watch: rxsubchans %d => %d\n",425425 state->rxsubchans,rxsubchans);426426 state->rxsubchans = rxsubchans;427427 }428428 if (newnicam != state->nicam_on) {429429 update = 1;430430- v4l_dbg(1, client, "watch: nicam %d => %d\n",430430+ v4l_dbg(1, msp_debug, client, "watch: nicam %d => %d\n",431431 state->nicam_on,newnicam);432432 state->nicam_on = newnicam;433433 }···452452 msp3400c_setstereo(client, V4L2_TUNER_MODE_MONO);453453 }454454455455- if (once)455455+ if (msp_once)456456 state->watch_stereo = 0;457457}458458···464464 int count, max1,max2,val1,val2, val,this;465465466466467467- v4l_dbg(1, client, "msp3400 daemon started\n");467467+ v4l_dbg(1, msp_debug, client, "msp3400 daemon started\n");468468 for (;;) {469469- v4l_dbg(2, client, "msp3400 thread: sleep\n");469469+ v4l_dbg(2, msp_debug, client, "msp3400 thread: sleep\n");470470 msp_sleep(state, -1);471471- v4l_dbg(2, client, "msp3400 thread: wakeup\n");471471+ v4l_dbg(2, msp_debug, client, "msp3400 thread: wakeup\n");472472473473 restart:474474- v4l_dbg(1, client, "thread: restart scan\n");474474+ v4l_dbg(1, msp_debug, client, "thread: restart scan\n");475475 state->restart = 0;476476 if (kthread_should_stop())477477 break;478478479479 if (state->radio || MSP_MODE_EXTERN == state->mode) {480480 /* no carrier scan, just unmute */481481- v4l_dbg(1, client, "thread: no carrier scan\n");481481+ v4l_dbg(1, msp_debug, client, "thread: no carrier scan\n");482482 msp_set_audio(client);483483 continue;484484 }···498498 cd = msp3400c_carrier_detect_main;499499 count = ARRAY_SIZE(msp3400c_carrier_detect_main);500500501501- if (amsound && (state->v4l2_std & V4L2_STD_SECAM)) {501501+ if (msp_amsound && (state->v4l2_std & V4L2_STD_SECAM)) {502502 /* autodetect doesn't work well with AM ... */503503 max1 = 3;504504 count = 0;505505- v4l_dbg(1, client, "AM sound override\n");505505+ v4l_dbg(1, msp_debug, client, "AM sound override\n");506506 }507507508508 for (this = 0; this < count; this++) {···514514 val -= 65536;515515 if (val1 < val)516516 val1 = val, max1 = this;517517- v4l_dbg(1, client, "carrier1 val: %5d / %s\n", val,cd[this].name);517517+ v4l_dbg(1, msp_debug, client, "carrier1 val: %5d / %s\n", val,cd[this].name);518518 }519519520520 /* carrier detect pass #2 -- second (stereo) carrier */···535535 break;536536 }537537538538- if (amsound && (state->v4l2_std & V4L2_STD_SECAM)) {538538+ if (msp_amsound && (state->v4l2_std & V4L2_STD_SECAM)) {539539 /* autodetect doesn't work well with AM ... */540540 cd = NULL;541541 count = 0;···550550 val -= 65536;551551 if (val2 < val)552552 val2 = val, max2 = this;553553- v4l_dbg(1, client, "carrier2 val: %5d / %s\n", val,cd[this].name);553553+ v4l_dbg(1, msp_debug, client, "carrier2 val: %5d / %s\n", val,cd[this].name);554554 }555555556556 /* program the msp3400 according to the results */···627627 /* unmute */628628 msp_set_audio(client);629629630630- if (debug)630630+ if (msp_debug)631631 msp3400c_print_mode(client);632632633633 /* monitor tv audio mode */···637637 watch_stereo(client);638638 }639639 }640640- v4l_dbg(1, client, "thread: exit\n");640640+ v4l_dbg(1, msp_debug, client, "thread: exit\n");641641 return 0;642642}643643···648648 struct msp_state *state = i2c_get_clientdata(client);649649 int val, i, std;650650651651- v4l_dbg(1, client, "msp3410 daemon started\n");651651+ v4l_dbg(1, msp_debug, client, "msp3410 daemon started\n");652652653653 for (;;) {654654- v4l_dbg(2, client, "msp3410 thread: sleep\n");654654+ v4l_dbg(2, msp_debug, client, "msp3410 thread: sleep\n");655655 msp_sleep(state,-1);656656- v4l_dbg(2, client, "msp3410 thread: wakeup\n");656656+ v4l_dbg(2, msp_debug, client, "msp3410 thread: wakeup\n");657657658658 restart:659659- v4l_dbg(1, client, "thread: restart scan\n");659659+ v4l_dbg(1, msp_debug, client, "thread: restart scan\n");660660 state->restart = 0;661661 if (kthread_should_stop())662662 break;663663664664 if (state->mode == MSP_MODE_EXTERN) {665665 /* no carrier scan needed, just unmute */666666- v4l_dbg(1, client, "thread: no carrier scan\n");666666+ v4l_dbg(1, msp_debug, client, "thread: no carrier scan\n");667667 msp_set_audio(client);668668 continue;669669 }···682682 std = (state->v4l2_std & V4L2_STD_NTSC) ? 0x20 : 1;683683 state->watch_stereo = 0;684684685685- if (debug)686686- v4l_dbg(1, client, "setting standard: %s (0x%04x)\n",685685+ if (msp_debug)686686+ v4l_dbg(1, msp_debug, client, "setting standard: %s (0x%04x)\n",687687 msp_standard_std_name(std), std);688688689689 if (std != 1) {···700700 val = msp_read_dem(client, 0x7e);701701 if (val < 0x07ff)702702 break;703703- v4l_dbg(1, client, "detection still in progress\n");703703+ v4l_dbg(1, msp_debug, client, "detection still in progress\n");704704 }705705 }706706 for (i = 0; msp_stdlist[i].name != NULL; i++)707707 if (msp_stdlist[i].retval == val)708708 break;709709- v4l_dbg(1, client, "current standard: %s (0x%04x)\n",709709+ v4l_dbg(1, msp_debug, client, "current standard: %s (0x%04x)\n",710710 msp_standard_std_name(val), val);711711 state->main = msp_stdlist[i].main;712712 state->second = msp_stdlist[i].second;713713 state->std = val;714714715715- if (amsound && !state->radio && (state->v4l2_std & V4L2_STD_SECAM) &&715715+ if (msp_amsound && !state->radio && (state->v4l2_std & V4L2_STD_SECAM) &&716716 (val != 0x0009)) {717717 /* autodetection has failed, let backup */718718- v4l_dbg(1, client, "autodetection failed,"718718+ v4l_dbg(1, msp_debug, client, "autodetection failed,"719719 " switching to backup standard: %s (0x%04x)\n",720720 msp_stdlist[8].name ? msp_stdlist[8].name : "unknown",val);721721 val = 0x0009;···798798 watch_stereo(client);799799 }800800 }801801- v4l_dbg(1, client, "thread: exit\n");801801+ v4l_dbg(1, msp_debug, client, "thread: exit\n");802802 return 0;803803}804804805805/* ----------------------------------------------------------------------- */806806807807-/* msp34xxG + (autoselect no-thread) */807807+/* msp34xxG + (autoselect no-thread) */808808/* this one uses both automatic standard detection and automatic sound */809809/* select which are available in the newer G versions */810810/* struct msp: only norm, acb and source are really used in this mode */···825825 */826826 int value = (source & 0x07) << 8 | (source == 0 ? 0x30 : 0x20);827827828828- v4l_dbg(1, client, "set source to %d (0x%x)\n", source, value);828828+ v4l_dbg(1, msp_debug, client, "set source to %d (0x%x)\n", source, value);829829 /* Loudspeaker Output */830830 msp_write_dsp(client, 0x08, value);831831 /* SCART1 DA Output */···840840 * 0x7f0 = forced mono mode841841 */842842 /* a2 threshold for stereo/bilingual */843843- msp_write_dem(client, 0x22, stereo_threshold);843843+ msp_write_dem(client, 0x22, msp_stereo_thresh);844844 state->source = source;845845}846846···897897 struct msp_state *state = i2c_get_clientdata(client);898898 int val, std, i;899899900900- v4l_dbg(1, client, "msp34xxg daemon started\n");900900+ v4l_dbg(1, msp_debug, client, "msp34xxg daemon started\n");901901902902 state->source = 1; /* default */903903 for (;;) {904904- v4l_dbg(2, client, "msp34xxg thread: sleep\n");904904+ v4l_dbg(2, msp_debug, client, "msp34xxg thread: sleep\n");905905 msp_sleep(state, -1);906906- v4l_dbg(2, client, "msp34xxg thread: wakeup\n");906906+ v4l_dbg(2, msp_debug, client, "msp34xxg thread: wakeup\n");907907908908 restart:909909- v4l_dbg(1, client, "thread: restart scan\n");909909+ v4l_dbg(1, msp_debug, client, "thread: restart scan\n");910910 state->restart = 0;911911 if (kthread_should_stop())912912 break;913913914914 /* setup the chip*/915915 msp34xxg_reset(client);916916- std = standard;916916+ std = msp_standard;917917 if (std != 0x01)918918 goto unmute;919919920920 /* watch autodetect */921921- v4l_dbg(1, client, "triggered autodetect, waiting for result\n");921921+ v4l_dbg(1, msp_debug, client, "triggered autodetect, waiting for result\n");922922 for (i = 0; i < 10; i++) {923923 if (msp_sleep(state, 100))924924 goto restart;···929929 std = val;930930 break;931931 }932932- v4l_dbg(2, client, "detection still in progress\n");932932+ v4l_dbg(2, msp_debug, client, "detection still in progress\n");933933 }934934 if (std == 1) {935935- v4l_dbg(1, client, "detection still in progress after 10 tries. giving up.\n");935935+ v4l_dbg(1, msp_debug, client, "detection still in progress after 10 tries. giving up.\n");936936 continue;937937 }938938939939 unmute:940940 state->std = std;941941- v4l_dbg(1, client, "current standard: %s (0x%04x)\n",941941+ v4l_dbg(1, msp_debug, client, "current standard: %s (0x%04x)\n",942942 msp_standard_std_name(std), std);943943944944 /* unmute: dispatch sound to scart output, set scart volume */···950950951951 msp_write_dem(client, 0x40, state->i2s_mode);952952 }953953- v4l_dbg(1, client, "thread: exit\n");953953+ v4l_dbg(1, msp_debug, client, "thread: exit\n");954954 return 0;955955}956956···976976 * this is a problem, I'll handle SAP just like lang1/lang2.977977 */978978 }979979- v4l_dbg(1, client, "status=0x%x, stereo=%d, bilingual=%d -> rxsubchans=%d\n",979979+ v4l_dbg(1, msp_debug, client, "status=0x%x, stereo=%d, bilingual=%d -> rxsubchans=%d\n",980980 status, is_stereo, is_bilingual, state->rxsubchans);981981}982982
+6-6
drivers/media/video/msp3400.h
···4848#define OPMODE_AUTOSELECT 2 /* use autodetect & autoselect (>= msp34xxG) */49495050/* module parameters */5151-extern int debug;5252-extern int once;5353-extern int amsound;5454-extern int standard;5555-extern int dolby;5656-extern int stereo_threshold;5151+extern int msp_debug;5252+extern int msp_once;5353+extern int msp_amsound;5454+extern int msp_standard;5555+extern int msp_dolby;5656+extern int msp_stereo_thresh;57575858struct msp_state {5959 int rev1, rev2;
+4-4
drivers/media/video/mt20xx.c
···2121module_param(radio_antenna, int, 0644);22222323/* from tuner-core.c */2424-extern int debug;2424+extern int tuner_debug;25252626/* ---------------------------------------------------------------------- */2727···404404 div2a=(lo2/8)-1;405405 div2b=lo2-(div2a+1)*8;406406407407- if (debug > 1) {407407+ if (tuner_debug > 1) {408408 tuner_dbg("lo1 lo2 = %d %d\n", lo1, lo2);409409 tuner_dbg("num1 num2 div1a div1b div2a div2b= %x %x %x %x %x %x\n",410410 num1,num2,div1a,div1b,div2a,div2b);···420420 buf[5]=div2a;421421 if(num2!=0) buf[5]=buf[5]|0x40;422422423423- if (debug > 1) {423423+ if (tuner_debug > 1) {424424 int i;425425 tuner_dbg("bufs is: ");426426 for(i=0;i<6;i++)···508508509509 i2c_master_send(c,buf,1);510510 i2c_master_recv(c,buf,21);511511- if (debug) {511511+ if (tuner_debug) {512512 int i;513513 tuner_dbg("MT20xx hexdump:");514514 for(i=0;i<21;i++) {
···1515config VIDEO_SAA7134_ALSA1616 tristate "Philips SAA7134 DMA audio support"1717 depends on VIDEO_SAA7134 && SND1818- select SND_PCM_OSS1818+ select SND_PCM1919 ---help---2020 This is a video4linux driver for direct (DMA) audio in2121 Philips SAA713x based TV cards using ALSA
···7373 unsigned int nr;7474 unsigned long irq; /* IRQ used by SAA7146 card */7575 unsigned short id;7676- struct pci_dev *dev;7776 unsigned char revision;7877 unsigned char boardcfg[64]; /* 64 bytes of config from eeprom */7978 unsigned long saa7146_adr; /* bus address of IO mem from PCI BIOS */
···218218 printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \219219 i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0)220220#define tuner_dbg(fmt, arg...) do {\221221- extern int debug; \222222- if (debug) \221221+ extern int tuner_debug; \222222+ if (tuner_debug) \223223 printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \224224 i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0)225225
+1-2
include/media/v4l2-common.h
···49495050/* These three macros assume that the debug level is set with a module5151 parameter called 'debug'. */5252-#define v4l_dbg(level, client, fmt, arg...) \5252+#define v4l_dbg(level, debug, client, fmt, arg...) \5353 do { \5454- extern int debug; \5554 if (debug >= (level)) \5655 v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \5756 } while (0)