Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (7655): tda10086 coding stlye fixes

This patch replaces the c++ style comments.
No functional changes

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>

authored by

Hartmut Hackmann and committed by
Mauro Carvalho Chehab
b1c54fe2 9a1b04e4

+52 -52
+50 -50
drivers/media/dvb/frontends/tda10086.c
··· 90 90 { 91 91 int val; 92 92 93 - // read a byte and check 93 + /* read a byte and check */ 94 94 val = tda10086_read_byte(state, reg); 95 95 if (val < 0) 96 96 return val; 97 97 98 - // mask if off 98 + /* mask if off */ 99 99 val = val & ~mask; 100 100 val |= data & 0xff; 101 101 102 - // write it out again 102 + /* write it out again */ 103 103 return tda10086_write_byte(state, reg, val); 104 104 } 105 105 ··· 112 112 113 113 if (state->config->diseqc_tone) 114 114 t22k_off = 0; 115 - // reset 115 + /* reset */ 116 116 tda10086_write_byte(state, 0x00, 0x00); 117 117 msleep(10); 118 118 119 - // misc setup 119 + /* misc setup */ 120 120 tda10086_write_byte(state, 0x01, 0x94); 121 - tda10086_write_byte(state, 0x02, 0x35); // NOTE: TT drivers appear to disable CSWP 121 + tda10086_write_byte(state, 0x02, 0x35); /* NOTE: TT drivers appear to disable CSWP */ 122 122 tda10086_write_byte(state, 0x03, 0xe4); 123 123 tda10086_write_byte(state, 0x04, 0x43); 124 124 tda10086_write_byte(state, 0x0c, 0x0c); 125 - tda10086_write_byte(state, 0x1b, 0xb0); // noise threshold 126 - tda10086_write_byte(state, 0x20, 0x89); // misc 127 - tda10086_write_byte(state, 0x30, 0x04); // acquisition period length 128 - tda10086_write_byte(state, 0x32, 0x00); // irq off 129 - tda10086_write_byte(state, 0x31, 0x56); // setup AFC 125 + tda10086_write_byte(state, 0x1b, 0xb0); /* noise threshold */ 126 + tda10086_write_byte(state, 0x20, 0x89); /* misc */ 127 + tda10086_write_byte(state, 0x30, 0x04); /* acquisition period length */ 128 + tda10086_write_byte(state, 0x32, 0x00); /* irq off */ 129 + tda10086_write_byte(state, 0x31, 0x56); /* setup AFC */ 130 130 131 - // setup PLL (this assumes SACLK = 96MHz) 132 - tda10086_write_byte(state, 0x55, 0x2c); // misc PLL setup 131 + /* setup PLL (this assumes SACLK = 96MHz) */ 132 + tda10086_write_byte(state, 0x55, 0x2c); /* misc PLL setup */ 133 133 if (state->config->xtal_freq == TDA10086_XTAL_16M) { 134 - tda10086_write_byte(state, 0x3a, 0x0b); // M=12 135 - tda10086_write_byte(state, 0x3b, 0x01); // P=2 134 + tda10086_write_byte(state, 0x3a, 0x0b); /* M=12 */ 135 + tda10086_write_byte(state, 0x3b, 0x01); /* P=2 */ 136 136 } else { 137 - tda10086_write_byte(state, 0x3a, 0x17); // M=24 138 - tda10086_write_byte(state, 0x3b, 0x00); // P=1 137 + tda10086_write_byte(state, 0x3a, 0x17); /* M=24 */ 138 + tda10086_write_byte(state, 0x3b, 0x00); /* P=1 */ 139 139 } 140 - tda10086_write_mask(state, 0x55, 0x20, 0x00); // powerup PLL 140 + tda10086_write_mask(state, 0x55, 0x20, 0x00); /* powerup PLL */ 141 141 142 - // setup TS interface 142 + /* setup TS interface */ 143 143 tda10086_write_byte(state, 0x11, 0x81); 144 144 tda10086_write_byte(state, 0x12, 0x81); 145 - tda10086_write_byte(state, 0x19, 0x40); // parallel mode A + MSBFIRST 146 - tda10086_write_byte(state, 0x56, 0x80); // powerdown WPLL - unused in the mode we use 147 - tda10086_write_byte(state, 0x57, 0x08); // bypass WPLL - unused in the mode we use 145 + tda10086_write_byte(state, 0x19, 0x40); /* parallel mode A + MSBFIRST */ 146 + tda10086_write_byte(state, 0x56, 0x80); /* powerdown WPLL - unused in the mode we use */ 147 + tda10086_write_byte(state, 0x57, 0x08); /* bypass WPLL - unused in the mode we use */ 148 148 tda10086_write_byte(state, 0x10, 0x2a); 149 149 150 - // setup ADC 151 - tda10086_write_byte(state, 0x58, 0x61); // ADC setup 152 - tda10086_write_mask(state, 0x58, 0x01, 0x00); // powerup ADC 150 + /* setup ADC */ 151 + tda10086_write_byte(state, 0x58, 0x61); /* ADC setup */ 152 + tda10086_write_mask(state, 0x58, 0x01, 0x00); /* powerup ADC */ 153 153 154 - // setup AGC 154 + /* setup AGC */ 155 155 tda10086_write_byte(state, 0x05, 0x0B); 156 156 tda10086_write_byte(state, 0x37, 0x63); 157 - tda10086_write_byte(state, 0x3f, 0x0a); // NOTE: flydvb varies it 157 + tda10086_write_byte(state, 0x3f, 0x0a); /* NOTE: flydvb varies it */ 158 158 tda10086_write_byte(state, 0x40, 0x64); 159 159 tda10086_write_byte(state, 0x41, 0x4f); 160 160 tda10086_write_byte(state, 0x42, 0x43); 161 161 162 - // setup viterbi 163 - tda10086_write_byte(state, 0x1a, 0x11); // VBER 10^6, DVB, QPSK 162 + /* setup viterbi */ 163 + tda10086_write_byte(state, 0x1a, 0x11); /* VBER 10^6, DVB, QPSK */ 164 164 165 - // setup carrier recovery 165 + /* setup carrier recovery */ 166 166 tda10086_write_byte(state, 0x3d, 0x80); 167 167 168 - // setup SEC 169 - tda10086_write_byte(state, 0x36, t22k_off); // all SEC off, 22k tone 170 - tda10086_write_byte(state, 0x34, (((1<<19) * (22000/1000)) / (SACLK/1000))); // } tone frequency 171 - tda10086_write_byte(state, 0x35, (((1<<19) * (22000/1000)) / (SACLK/1000)) >> 8); // } 168 + /* setup SEC */ 169 + tda10086_write_byte(state, 0x36, t22k_off); /* all SEC off, 22k tone */ 170 + tda10086_write_byte(state, 0x34, (((1<<19) * (22000/1000)) / (SACLK/1000))); 171 + tda10086_write_byte(state, 0x35, (((1<<19) * (22000/1000)) / (SACLK/1000)) >> 8); 172 172 173 173 return 0; 174 174 } ··· 307 307 308 308 dprintk ("%s %i\n", __func__, symbol_rate); 309 309 310 - // setup the decimation and anti-aliasing filters.. 310 + /* setup the decimation and anti-aliasing filters.. */ 311 311 if (symbol_rate < (u32) (SACLK * 0.0137)) { 312 312 dfn=4; 313 313 afs=1; ··· 344 344 byp=1; 345 345 } 346 346 347 - // calculate BDR 347 + /* calculate BDR */ 348 348 big = (1ULL<<21) * ((u64) symbol_rate/1000ULL) * (1ULL<<dfn); 349 349 big += ((SACLK/1000ULL)-1ULL); 350 350 do_div(big, (SACLK/1000ULL)); 351 351 bdr = big & 0xfffff; 352 352 353 - // calculate BDRI 353 + /* calculate BDRI */ 354 354 tmp = (1<<dfn)*(symbol_rate/1000); 355 355 bdri = ((32 * (SACLK/1000)) + (tmp-1)) / tmp; 356 356 ··· 419 419 420 420 dprintk ("%s\n", __func__); 421 421 422 - // modify parameters for tuning 422 + /* modify parameters for tuning */ 423 423 tda10086_write_byte(state, 0x02, 0x35); 424 424 state->has_lock = false; 425 425 426 - // set params 426 + /* set params */ 427 427 if (fe->ops.tuner_ops.set_params) { 428 428 fe->ops.tuner_ops.set_params(fe, fe_params); 429 429 if (fe->ops.i2c_gate_ctrl) ··· 435 435 fe->ops.i2c_gate_ctrl(fe, 0); 436 436 } 437 437 438 - // calcluate the frequency offset (in *Hz* not kHz) 438 + /* calcluate the frequency offset (in *Hz* not kHz) */ 439 439 freqoff = fe_params->frequency - freq; 440 440 freqoff = ((1<<16) * freqoff) / (SACLK/1000); 441 441 tda10086_write_byte(state, 0x3d, 0x80 | ((freqoff >> 8) & 0x7f)); ··· 448 448 if ((ret = tda10086_set_fec(state, fe_params)) < 0) 449 449 return ret; 450 450 451 - // soft reset + disable TS output until lock 451 + /* soft reset + disable TS output until lock */ 452 452 tda10086_write_mask(state, 0x10, 0x40, 0x40); 453 453 tda10086_write_mask(state, 0x00, 0x01, 0x00); 454 454 ··· 466 466 467 467 dprintk ("%s\n", __func__); 468 468 469 - // check for invalid symbol rate 469 + /* check for invalid symbol rate */ 470 470 if (fe_params->u.qpsk.symbol_rate < 500000) 471 471 return -EINVAL; 472 472 473 - // calculate the updated frequency (note: we convert from Hz->kHz) 473 + /* calculate the updated frequency (note: we convert from Hz->kHz) */ 474 474 tmp64 = tda10086_read_byte(state, 0x52); 475 475 tmp64 |= (tda10086_read_byte(state, 0x51) << 8); 476 476 if (tmp64 & 0x8000) ··· 479 479 do_div(tmp64, (1ULL<<15) * (1ULL<<1)); 480 480 fe_params->frequency = (int) state->frequency + (int) tmp64; 481 481 482 - // the inversion 482 + /* the inversion */ 483 483 val = tda10086_read_byte(state, 0x0c); 484 484 if (val & 0x80) { 485 485 switch(val & 0x40) { ··· 510 510 } 511 511 } 512 512 513 - // calculate the updated symbol rate 513 + /* calculate the updated symbol rate */ 514 514 tmp = tda10086_read_byte(state, 0x1d); 515 515 if (tmp & 0x80) 516 516 tmp |= 0xffffff00; ··· 518 518 tmp = ((state->symbol_rate/1000) * tmp) / (1000000/1000); 519 519 fe_params->u.qpsk.symbol_rate = state->symbol_rate + tmp; 520 520 521 - // the FEC 521 + /* the FEC */ 522 522 val = (tda10086_read_byte(state, 0x0d) & 0x70) >> 4; 523 523 switch(val) { 524 524 case 0x00: ··· 571 571 *fe_status |= FE_HAS_LOCK; 572 572 if (!state->has_lock) { 573 573 state->has_lock = true; 574 - // modify parameters for stable reception 574 + /* modify parameters for stable reception */ 575 575 tda10086_write_byte(state, 0x02, 0x00); 576 576 } 577 577 } ··· 611 611 612 612 dprintk ("%s\n", __func__); 613 613 614 - // read it 614 + /* read it */ 615 615 *ucblocks = tda10086_read_byte(state, 0x18) & 0x7f; 616 616 617 - // reset counter 617 + /* reset counter */ 618 618 tda10086_write_byte(state, 0x18, 0x00); 619 619 tda10086_write_byte(state, 0x18, 0x80); 620 620 ··· 627 627 628 628 dprintk ("%s\n", __func__); 629 629 630 - // read it 630 + /* read it */ 631 631 *ber = 0; 632 632 *ber |= tda10086_read_byte(state, 0x15); 633 633 *ber |= tda10086_read_byte(state, 0x16) << 8;
+2 -2
drivers/media/dvb/frontends/tda10086.h
··· 56 56 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 57 57 return NULL; 58 58 } 59 - #endif // CONFIG_DVB_TDA10086 59 + #endif /* CONFIG_DVB_TDA10086 */ 60 60 61 - #endif // TDA10086_H 61 + #endif /* TDA10086_H */