diff options
Diffstat (limited to 'drivers/media/dvb/frontends/tda80xx.c')
-rw-r--r-- | drivers/media/dvb/frontends/tda80xx.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/media/dvb/frontends/tda80xx.c b/drivers/media/dvb/frontends/tda80xx.c index c99632114283..032d348dafb7 100644 --- a/drivers/media/dvb/frontends/tda80xx.c +++ b/drivers/media/dvb/frontends/tda80xx.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/threads.h> | 28 | #include <linux/threads.h> |
29 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
30 | #include <asm/irq.h> | 30 | #include <linux/irq.h> |
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
@@ -400,7 +400,7 @@ static void tda80xx_wait_diseqc_fifo(struct tda80xx_state* state) | |||
400 | 400 | ||
401 | static int tda8044_init(struct dvb_frontend* fe) | 401 | static 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 | ||
433 | static int tda8083_init(struct dvb_frontend* fe) | 433 | static 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 | ||
448 | static int tda80xx_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) | 448 | static 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 | ||
464 | static int tda80xx_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone) | 464 | static 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 | ||
478 | static int tda80xx_send_diseqc_msg(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd *cmd) | 478 | static 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 | ||
493 | static int tda80xx_send_diseqc_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t cmd) | 493 | static 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 | ||
513 | static int tda80xx_sleep(struct dvb_frontend* fe) | 513 | static 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 | ||
522 | static int tda80xx_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) | 522 | static 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 | ||
538 | static int tda80xx_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) | 538 | static 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 | ||
551 | static int tda80xx_read_status(struct dvb_frontend* fe, fe_status_t* status) | 551 | static 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 | ||
562 | static int tda80xx_read_ber(struct dvb_frontend* fe, u32* ber) | 562 | static 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 | ||
576 | static int tda80xx_read_signal_strength(struct dvb_frontend* fe, u16* strength) | 576 | static 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 | ||
586 | static int tda80xx_read_snr(struct dvb_frontend* fe, u16* snr) | 586 | static 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 | ||
596 | static int tda80xx_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) | 596 | static 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 | ||
607 | static int tda80xx_init(struct dvb_frontend* fe) | 607 | static 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 | ||
621 | static void tda80xx_release(struct dvb_frontend* fe) | 621 | static 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 */ |