diff options
author | Steven Toth <stoth@linuxtv.org> | 2008-10-16 19:22:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-17 16:27:38 -0400 |
commit | 5c2a164aade7e936f1bf4852cbae12ea1092194a (patch) | |
tree | 0c739b2572c00e805c3c4b3a8d3ca9f8934d3b6c /drivers/media/dvb/frontends/tda10048.c | |
parent | f11ec7d4ee4308592dbd9b1db645ab14fe32719c (diff) |
V4L/DVB (9255): tda10048: Checkpatch compliance
tda10048: Checkpatch compliance
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/tda10048.c')
-rw-r--r-- | drivers/media/dvb/frontends/tda10048.c | 100 |
1 files changed, 73 insertions, 27 deletions
diff --git a/drivers/media/dvb/frontends/tda10048.c b/drivers/media/dvb/frontends/tda10048.c index 04e7f1cc1403..2a8bbcd44cd0 100644 --- a/drivers/media/dvb/frontends/tda10048.c +++ b/drivers/media/dvb/frontends/tda10048.c | |||
@@ -195,7 +195,7 @@ static struct init_tab { | |||
195 | static int tda10048_writereg(struct tda10048_state *state, u8 reg, u8 data) | 195 | static int tda10048_writereg(struct tda10048_state *state, u8 reg, u8 data) |
196 | { | 196 | { |
197 | int ret; | 197 | int ret; |
198 | u8 buf [] = { reg, data }; | 198 | u8 buf[] = { reg, data }; |
199 | struct i2c_msg msg = { | 199 | struct i2c_msg msg = { |
200 | .addr = state->config->demod_address, | 200 | .addr = state->config->demod_address, |
201 | .flags = 0, .buf = buf, .len = 2 }; | 201 | .flags = 0, .buf = buf, .len = 2 }; |
@@ -213,9 +213,9 @@ static int tda10048_writereg(struct tda10048_state *state, u8 reg, u8 data) | |||
213 | static u8 tda10048_readreg(struct tda10048_state *state, u8 reg) | 213 | static u8 tda10048_readreg(struct tda10048_state *state, u8 reg) |
214 | { | 214 | { |
215 | int ret; | 215 | int ret; |
216 | u8 b0 [] = { reg }; | 216 | u8 b0[] = { reg }; |
217 | u8 b1 [] = { 0 }; | 217 | u8 b1[] = { 0 }; |
218 | struct i2c_msg msg [] = { | 218 | struct i2c_msg msg[] = { |
219 | { .addr = state->config->demod_address, | 219 | { .addr = state->config->demod_address, |
220 | .flags = 0, .buf = b0, .len = 1 }, | 220 | .flags = 0, .buf = b0, .len = 1 }, |
221 | { .addr = state->config->demod_address, | 221 | { .addr = state->config->demod_address, |
@@ -393,43 +393,89 @@ static int tda10048_get_tps(struct tda10048_state *state, | |||
393 | 393 | ||
394 | val = tda10048_readreg(state, TDA10048_OUT_CONF2); | 394 | val = tda10048_readreg(state, TDA10048_OUT_CONF2); |
395 | switch ((val & 0x60) >> 5) { | 395 | switch ((val & 0x60) >> 5) { |
396 | case 0: p->constellation = QPSK; break; | 396 | case 0: |
397 | case 1: p->constellation = QAM_16; break; | 397 | p->constellation = QPSK; |
398 | case 2: p->constellation = QAM_64; break; | 398 | break; |
399 | case 1: | ||
400 | p->constellation = QAM_16; | ||
401 | break; | ||
402 | case 2: | ||
403 | p->constellation = QAM_64; | ||
404 | break; | ||
399 | } | 405 | } |
400 | switch ((val & 0x18) >> 3) { | 406 | switch ((val & 0x18) >> 3) { |
401 | case 0: p->hierarchy_information = HIERARCHY_NONE; break; | 407 | case 0: |
402 | case 1: p->hierarchy_information = HIERARCHY_1; break; | 408 | p->hierarchy_information = HIERARCHY_NONE; |
403 | case 2: p->hierarchy_information = HIERARCHY_2; break; | 409 | break; |
404 | case 3: p->hierarchy_information = HIERARCHY_4; break; | 410 | case 1: |
411 | p->hierarchy_information = HIERARCHY_1; | ||
412 | break; | ||
413 | case 2: | ||
414 | p->hierarchy_information = HIERARCHY_2; | ||
415 | break; | ||
416 | case 3: | ||
417 | p->hierarchy_information = HIERARCHY_4; | ||
418 | break; | ||
405 | } | 419 | } |
406 | switch (val & 0x07) { | 420 | switch (val & 0x07) { |
407 | case 0: p->code_rate_HP = FEC_1_2; break; | 421 | case 0: |
408 | case 1: p->code_rate_HP = FEC_2_3; break; | 422 | p->code_rate_HP = FEC_1_2; |
409 | case 2: p->code_rate_HP = FEC_3_4; break; | 423 | break; |
410 | case 3: p->code_rate_HP = FEC_5_6; break; | 424 | case 1: |
411 | case 4: p->code_rate_HP = FEC_7_8; break; | 425 | p->code_rate_HP = FEC_2_3; |
426 | break; | ||
427 | case 2: | ||
428 | p->code_rate_HP = FEC_3_4; | ||
429 | break; | ||
430 | case 3: | ||
431 | p->code_rate_HP = FEC_5_6; | ||
432 | break; | ||
433 | case 4: | ||
434 | p->code_rate_HP = FEC_7_8; | ||
435 | break; | ||
412 | } | 436 | } |
413 | 437 | ||
414 | val = tda10048_readreg(state, TDA10048_OUT_CONF3); | 438 | val = tda10048_readreg(state, TDA10048_OUT_CONF3); |
415 | switch (val & 0x07) { | 439 | switch (val & 0x07) { |
416 | case 0: p->code_rate_LP = FEC_1_2; break; | 440 | case 0: |
417 | case 1: p->code_rate_LP = FEC_2_3; break; | 441 | p->code_rate_LP = FEC_1_2; |
418 | case 2: p->code_rate_LP = FEC_3_4; break; | 442 | break; |
419 | case 3: p->code_rate_LP = FEC_5_6; break; | 443 | case 1: |
420 | case 4: p->code_rate_LP = FEC_7_8; break; | 444 | p->code_rate_LP = FEC_2_3; |
445 | break; | ||
446 | case 2: | ||
447 | p->code_rate_LP = FEC_3_4; | ||
448 | break; | ||
449 | case 3: | ||
450 | p->code_rate_LP = FEC_5_6; | ||
451 | break; | ||
452 | case 4: | ||
453 | p->code_rate_LP = FEC_7_8; | ||
454 | break; | ||
421 | } | 455 | } |
422 | 456 | ||
423 | val = tda10048_readreg(state, TDA10048_OUT_CONF1); | 457 | val = tda10048_readreg(state, TDA10048_OUT_CONF1); |
424 | switch ((val & 0x0c) >> 2) { | 458 | switch ((val & 0x0c) >> 2) { |
425 | case 0: p->guard_interval = GUARD_INTERVAL_1_32; break; | 459 | case 0: |
426 | case 1: p->guard_interval = GUARD_INTERVAL_1_16; break; | 460 | p->guard_interval = GUARD_INTERVAL_1_32; |
427 | case 2: p->guard_interval = GUARD_INTERVAL_1_8; break; | 461 | break; |
428 | case 3: p->guard_interval = GUARD_INTERVAL_1_4; break; | 462 | case 1: |
463 | p->guard_interval = GUARD_INTERVAL_1_16; | ||
464 | break; | ||
465 | case 2: | ||
466 | p->guard_interval = GUARD_INTERVAL_1_8; | ||
467 | break; | ||
468 | case 3: | ||
469 | p->guard_interval = GUARD_INTERVAL_1_4; | ||
470 | break; | ||
429 | } | 471 | } |
430 | switch (val & 0x02) { | 472 | switch (val & 0x02) { |
431 | case 0: p->transmission_mode = TRANSMISSION_MODE_2K; break; | 473 | case 0: |
432 | case 1: p->transmission_mode = TRANSMISSION_MODE_8K; break; | 474 | p->transmission_mode = TRANSMISSION_MODE_2K; |
475 | break; | ||
476 | case 1: | ||
477 | p->transmission_mode = TRANSMISSION_MODE_8K; | ||
478 | break; | ||
433 | } | 479 | } |
434 | 480 | ||
435 | return 0; | 481 | return 0; |