aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/tda80xx.c
diff options
context:
space:
mode:
authorJohannes Stezenbach <js@linuxtv.org>2005-05-17 00:54:31 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-17 10:59:30 -0400
commitb8742700f13163ffa00cddce2a3c940b9ab2ab5a (patch)
treeff82ac83508dc63d0dec63a3479df3b966018b34 /drivers/media/dvb/frontends/tda80xx.c
parent591ad98db3be2cd596ac5e0cfba7b164c3bdfb52 (diff)
[PATCH] dvb: remove unnecessary casts in frontends
remove unnecessary casts in frontends (Kenneth Aafloy) Signed-off-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/frontends/tda80xx.c')
-rw-r--r--drivers/media/dvb/frontends/tda80xx.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/media/dvb/frontends/tda80xx.c b/drivers/media/dvb/frontends/tda80xx.c
index c99632114283..00c145521f4f 100644
--- a/drivers/media/dvb/frontends/tda80xx.c
+++ b/drivers/media/dvb/frontends/tda80xx.c
@@ -400,7 +400,7 @@ static void tda80xx_wait_diseqc_fifo(struct tda80xx_state* state)
400 400
401static int tda8044_init(struct dvb_frontend* fe) 401static int tda8044_init(struct dvb_frontend* fe)
402{ 402{
403 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 403 struct tda80xx_state* state = fe->demodulator_priv;
404 int ret; 404 int ret;
405 405
406 /* 406 /*
@@ -432,7 +432,7 @@ static int tda8044_init(struct dvb_frontend* fe)
432 432
433static int tda8083_init(struct dvb_frontend* fe) 433static int tda8083_init(struct dvb_frontend* fe)
434{ 434{
435 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 435 struct tda80xx_state* state = fe->demodulator_priv;
436 436
437 tda80xx_write(state, 0x00, tda8083_inittab, sizeof(tda8083_inittab)); 437 tda80xx_write(state, 0x00, tda8083_inittab, sizeof(tda8083_inittab));
438 438
@@ -447,7 +447,7 @@ static int tda8083_init(struct dvb_frontend* fe)
447 447
448static int tda80xx_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) 448static int tda80xx_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage)
449{ 449{
450 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 450 struct tda80xx_state* state = fe->demodulator_priv;
451 451
452 switch (voltage) { 452 switch (voltage) {
453 case SEC_VOLTAGE_13: 453 case SEC_VOLTAGE_13:
@@ -463,7 +463,7 @@ static int tda80xx_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage
463 463
464static int tda80xx_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone) 464static int tda80xx_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone)
465{ 465{
466 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 466 struct tda80xx_state* state = fe->demodulator_priv;
467 467
468 switch (tone) { 468 switch (tone) {
469 case SEC_TONE_OFF: 469 case SEC_TONE_OFF:
@@ -477,7 +477,7 @@ static int tda80xx_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone)
477 477
478static int tda80xx_send_diseqc_msg(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd *cmd) 478static int tda80xx_send_diseqc_msg(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd *cmd)
479{ 479{
480 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 480 struct tda80xx_state* state = fe->demodulator_priv;
481 481
482 if (cmd->msg_len > 6) 482 if (cmd->msg_len > 6)
483 return -EINVAL; 483 return -EINVAL;
@@ -492,7 +492,7 @@ static int tda80xx_send_diseqc_msg(struct dvb_frontend* fe, struct dvb_diseqc_ma
492 492
493static int tda80xx_send_diseqc_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t cmd) 493static int tda80xx_send_diseqc_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t cmd)
494{ 494{
495 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 495 struct tda80xx_state* state = fe->demodulator_priv;
496 496
497 switch (cmd) { 497 switch (cmd) {
498 case SEC_MINI_A: 498 case SEC_MINI_A:
@@ -512,7 +512,7 @@ static int tda80xx_send_diseqc_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t
512 512
513static int tda80xx_sleep(struct dvb_frontend* fe) 513static int tda80xx_sleep(struct dvb_frontend* fe)
514{ 514{
515 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 515 struct tda80xx_state* state = fe->demodulator_priv;
516 516
517 tda80xx_writereg(state, 0x00, 0x02); /* enter standby */ 517 tda80xx_writereg(state, 0x00, 0x02); /* enter standby */
518 518
@@ -521,7 +521,7 @@ static int tda80xx_sleep(struct dvb_frontend* fe)
521 521
522static int tda80xx_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) 522static int tda80xx_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p)
523{ 523{
524 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 524 struct tda80xx_state* state = fe->demodulator_priv;
525 525
526 tda80xx_writereg(state, 0x1c, 0x80); 526 tda80xx_writereg(state, 0x1c, 0x80);
527 state->config->pll_set(fe, p); 527 state->config->pll_set(fe, p);
@@ -537,7 +537,7 @@ static int tda80xx_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
537 537
538static int tda80xx_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) 538static int tda80xx_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p)
539{ 539{
540 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 540 struct tda80xx_state* state = fe->demodulator_priv;
541 541
542 if (!state->config->irq) 542 if (!state->config->irq)
543 tda80xx_read_status_int(state); 543 tda80xx_read_status_int(state);
@@ -550,7 +550,7 @@ static int tda80xx_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
550 550
551static int tda80xx_read_status(struct dvb_frontend* fe, fe_status_t* status) 551static int tda80xx_read_status(struct dvb_frontend* fe, fe_status_t* status)
552{ 552{
553 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 553 struct tda80xx_state* state = fe->demodulator_priv;
554 554
555 if (!state->config->irq) 555 if (!state->config->irq)
556 tda80xx_read_status_int(state); 556 tda80xx_read_status_int(state);
@@ -561,7 +561,7 @@ static int tda80xx_read_status(struct dvb_frontend* fe, fe_status_t* status)
561 561
562static int tda80xx_read_ber(struct dvb_frontend* fe, u32* ber) 562static int tda80xx_read_ber(struct dvb_frontend* fe, u32* ber)
563{ 563{
564 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 564 struct tda80xx_state* state = fe->demodulator_priv;
565 int ret; 565 int ret;
566 u8 buf[3]; 566 u8 buf[3];
567 567
@@ -575,7 +575,7 @@ static int tda80xx_read_ber(struct dvb_frontend* fe, u32* ber)
575 575
576static int tda80xx_read_signal_strength(struct dvb_frontend* fe, u16* strength) 576static int tda80xx_read_signal_strength(struct dvb_frontend* fe, u16* strength)
577{ 577{
578 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 578 struct tda80xx_state* state = fe->demodulator_priv;
579 579
580 u8 gain = ~tda80xx_readreg(state, 0x01); 580 u8 gain = ~tda80xx_readreg(state, 0x01);
581 *strength = (gain << 8) | gain; 581 *strength = (gain << 8) | gain;
@@ -585,7 +585,7 @@ static int tda80xx_read_signal_strength(struct dvb_frontend* fe, u16* strength)
585 585
586static int tda80xx_read_snr(struct dvb_frontend* fe, u16* snr) 586static int tda80xx_read_snr(struct dvb_frontend* fe, u16* snr)
587{ 587{
588 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 588 struct tda80xx_state* state = fe->demodulator_priv;
589 589
590 u8 quality = tda80xx_readreg(state, 0x08); 590 u8 quality = tda80xx_readreg(state, 0x08);
591 *snr = (quality << 8) | quality; 591 *snr = (quality << 8) | quality;
@@ -595,7 +595,7 @@ static int tda80xx_read_snr(struct dvb_frontend* fe, u16* snr)
595 595
596static int tda80xx_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) 596static int tda80xx_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
597{ 597{
598 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 598 struct tda80xx_state* state = fe->demodulator_priv;
599 599
600 *ucblocks = tda80xx_readreg(state, 0x0f); 600 *ucblocks = tda80xx_readreg(state, 0x0f);
601 if (*ucblocks == 0xff) 601 if (*ucblocks == 0xff)
@@ -606,7 +606,7 @@ static int tda80xx_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
606 606
607static int tda80xx_init(struct dvb_frontend* fe) 607static int tda80xx_init(struct dvb_frontend* fe)
608{ 608{
609 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 609 struct tda80xx_state* state = fe->demodulator_priv;
610 610
611 switch(state->id) { 611 switch(state->id) {
612 case ID_TDA8044: 612 case ID_TDA8044:
@@ -620,7 +620,7 @@ static int tda80xx_init(struct dvb_frontend* fe)
620 620
621static void tda80xx_release(struct dvb_frontend* fe) 621static void tda80xx_release(struct dvb_frontend* fe)
622{ 622{
623 struct tda80xx_state* state = (struct tda80xx_state*) fe->demodulator_priv; 623 struct tda80xx_state* state = fe->demodulator_priv;
624 624
625 if (state->config->irq) 625 if (state->config->irq)
626 free_irq(state->config->irq, &state->worklet); 626 free_irq(state->config->irq, &state->worklet);
@@ -637,7 +637,7 @@ struct dvb_frontend* tda80xx_attach(const struct tda80xx_config* config,
637 int ret; 637 int ret;
638 638
639 /* allocate memory for the internal state */ 639 /* allocate memory for the internal state */
640 state = (struct tda80xx_state*) kmalloc(sizeof(struct tda80xx_state), GFP_KERNEL); 640 state = kmalloc(sizeof(struct tda80xx_state), GFP_KERNEL);
641 if (state == NULL) goto error; 641 if (state == NULL) goto error;
642 642
643 /* setup the state */ 643 /* setup the state */