diff options
Diffstat (limited to 'drivers/media/dvb/frontends/dib3000mb.c')
-rw-r--r-- | drivers/media/dvb/frontends/dib3000mb.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/media/dvb/frontends/dib3000mb.c b/drivers/media/dvb/frontends/dib3000mb.c index a853d12a26f1..f2fbb7c1598e 100644 --- a/drivers/media/dvb/frontends/dib3000mb.c +++ b/drivers/media/dvb/frontends/dib3000mb.c | |||
@@ -56,7 +56,7 @@ static int dib3000mb_get_frontend(struct dvb_frontend* fe, | |||
56 | static int dib3000mb_set_frontend(struct dvb_frontend* fe, | 56 | static int dib3000mb_set_frontend(struct dvb_frontend* fe, |
57 | struct dvb_frontend_parameters *fep, int tuner) | 57 | struct dvb_frontend_parameters *fep, int tuner) |
58 | { | 58 | { |
59 | struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; | 59 | struct dib3000_state* state = fe->demodulator_priv; |
60 | struct dvb_ofdm_parameters *ofdm = &fep->u.ofdm; | 60 | struct dvb_ofdm_parameters *ofdm = &fep->u.ofdm; |
61 | fe_code_rate_t fe_cr = FEC_NONE; | 61 | fe_code_rate_t fe_cr = FEC_NONE; |
62 | int search_state, seq; | 62 | int search_state, seq; |
@@ -317,7 +317,7 @@ static int dib3000mb_set_frontend(struct dvb_frontend* fe, | |||
317 | 317 | ||
318 | static int dib3000mb_fe_init(struct dvb_frontend* fe, int mobile_mode) | 318 | static int dib3000mb_fe_init(struct dvb_frontend* fe, int mobile_mode) |
319 | { | 319 | { |
320 | struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; | 320 | struct dib3000_state* state = fe->demodulator_priv; |
321 | 321 | ||
322 | deb_info("dib3000mb is getting up.\n"); | 322 | deb_info("dib3000mb is getting up.\n"); |
323 | wr(DIB3000MB_REG_POWER_CONTROL, DIB3000MB_POWER_UP); | 323 | wr(DIB3000MB_REG_POWER_CONTROL, DIB3000MB_POWER_UP); |
@@ -401,7 +401,7 @@ static int dib3000mb_fe_init(struct dvb_frontend* fe, int mobile_mode) | |||
401 | static int dib3000mb_get_frontend(struct dvb_frontend* fe, | 401 | static int dib3000mb_get_frontend(struct dvb_frontend* fe, |
402 | struct dvb_frontend_parameters *fep) | 402 | struct dvb_frontend_parameters *fep) |
403 | { | 403 | { |
404 | struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; | 404 | struct dib3000_state* state = fe->demodulator_priv; |
405 | struct dvb_ofdm_parameters *ofdm = &fep->u.ofdm; | 405 | struct dvb_ofdm_parameters *ofdm = &fep->u.ofdm; |
406 | fe_code_rate_t *cr; | 406 | fe_code_rate_t *cr; |
407 | u16 tps_val; | 407 | u16 tps_val; |
@@ -562,7 +562,7 @@ static int dib3000mb_get_frontend(struct dvb_frontend* fe, | |||
562 | 562 | ||
563 | static int dib3000mb_read_status(struct dvb_frontend* fe, fe_status_t *stat) | 563 | static int dib3000mb_read_status(struct dvb_frontend* fe, fe_status_t *stat) |
564 | { | 564 | { |
565 | struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; | 565 | struct dib3000_state* state = fe->demodulator_priv; |
566 | 566 | ||
567 | *stat = 0; | 567 | *stat = 0; |
568 | 568 | ||
@@ -594,7 +594,7 @@ static int dib3000mb_read_status(struct dvb_frontend* fe, fe_status_t *stat) | |||
594 | 594 | ||
595 | static int dib3000mb_read_ber(struct dvb_frontend* fe, u32 *ber) | 595 | static int dib3000mb_read_ber(struct dvb_frontend* fe, u32 *ber) |
596 | { | 596 | { |
597 | struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; | 597 | struct dib3000_state* state = fe->demodulator_priv; |
598 | 598 | ||
599 | *ber = ((rd(DIB3000MB_REG_BER_MSB) << 16) | rd(DIB3000MB_REG_BER_LSB)); | 599 | *ber = ((rd(DIB3000MB_REG_BER_MSB) << 16) | rd(DIB3000MB_REG_BER_LSB)); |
600 | return 0; | 600 | return 0; |
@@ -603,7 +603,7 @@ static int dib3000mb_read_ber(struct dvb_frontend* fe, u32 *ber) | |||
603 | /* see dib3000-watch dvb-apps for exact calcuations of signal_strength and snr */ | 603 | /* see dib3000-watch dvb-apps for exact calcuations of signal_strength and snr */ |
604 | static int dib3000mb_read_signal_strength(struct dvb_frontend* fe, u16 *strength) | 604 | static int dib3000mb_read_signal_strength(struct dvb_frontend* fe, u16 *strength) |
605 | { | 605 | { |
606 | struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; | 606 | struct dib3000_state* state = fe->demodulator_priv; |
607 | 607 | ||
608 | *strength = rd(DIB3000MB_REG_SIGNAL_POWER) * 0xffff / 0x170; | 608 | *strength = rd(DIB3000MB_REG_SIGNAL_POWER) * 0xffff / 0x170; |
609 | return 0; | 609 | return 0; |
@@ -611,7 +611,7 @@ static int dib3000mb_read_signal_strength(struct dvb_frontend* fe, u16 *strength | |||
611 | 611 | ||
612 | static int dib3000mb_read_snr(struct dvb_frontend* fe, u16 *snr) | 612 | static int dib3000mb_read_snr(struct dvb_frontend* fe, u16 *snr) |
613 | { | 613 | { |
614 | struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; | 614 | struct dib3000_state* state = fe->demodulator_priv; |
615 | short sigpow = rd(DIB3000MB_REG_SIGNAL_POWER); | 615 | short sigpow = rd(DIB3000MB_REG_SIGNAL_POWER); |
616 | int icipow = ((rd(DIB3000MB_REG_NOISE_POWER_MSB) & 0xff) << 16) | | 616 | int icipow = ((rd(DIB3000MB_REG_NOISE_POWER_MSB) & 0xff) << 16) | |
617 | rd(DIB3000MB_REG_NOISE_POWER_LSB); | 617 | rd(DIB3000MB_REG_NOISE_POWER_LSB); |
@@ -621,7 +621,7 @@ static int dib3000mb_read_snr(struct dvb_frontend* fe, u16 *snr) | |||
621 | 621 | ||
622 | static int dib3000mb_read_unc_blocks(struct dvb_frontend* fe, u32 *unc) | 622 | static int dib3000mb_read_unc_blocks(struct dvb_frontend* fe, u32 *unc) |
623 | { | 623 | { |
624 | struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; | 624 | struct dib3000_state* state = fe->demodulator_priv; |
625 | 625 | ||
626 | *unc = rd(DIB3000MB_REG_UNC); | 626 | *unc = rd(DIB3000MB_REG_UNC); |
627 | return 0; | 627 | return 0; |
@@ -629,7 +629,7 @@ static int dib3000mb_read_unc_blocks(struct dvb_frontend* fe, u32 *unc) | |||
629 | 629 | ||
630 | static int dib3000mb_sleep(struct dvb_frontend* fe) | 630 | static int dib3000mb_sleep(struct dvb_frontend* fe) |
631 | { | 631 | { |
632 | struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; | 632 | struct dib3000_state* state = fe->demodulator_priv; |
633 | deb_info("dib3000mb is going to bed.\n"); | 633 | deb_info("dib3000mb is going to bed.\n"); |
634 | wr(DIB3000MB_REG_POWER_CONTROL, DIB3000MB_POWER_DOWN); | 634 | wr(DIB3000MB_REG_POWER_CONTROL, DIB3000MB_POWER_DOWN); |
635 | return 0; | 635 | return 0; |
@@ -656,7 +656,7 @@ static int dib3000mb_set_frontend_and_tuner(struct dvb_frontend* fe, struct dvb_ | |||
656 | 656 | ||
657 | static void dib3000mb_release(struct dvb_frontend* fe) | 657 | static void dib3000mb_release(struct dvb_frontend* fe) |
658 | { | 658 | { |
659 | struct dib3000_state *state = (struct dib3000_state*) fe->demodulator_priv; | 659 | struct dib3000_state *state = fe->demodulator_priv; |
660 | kfree(state); | 660 | kfree(state); |
661 | } | 661 | } |
662 | 662 | ||
@@ -671,7 +671,7 @@ static int dib3000mb_pid_control(struct dvb_frontend *fe,int index, int pid,int | |||
671 | 671 | ||
672 | static int dib3000mb_fifo_control(struct dvb_frontend *fe, int onoff) | 672 | static int dib3000mb_fifo_control(struct dvb_frontend *fe, int onoff) |
673 | { | 673 | { |
674 | struct dib3000_state *state = (struct dib3000_state*) fe->demodulator_priv; | 674 | struct dib3000_state *state = fe->demodulator_priv; |
675 | 675 | ||
676 | deb_xfer("%s fifo\n",onoff ? "enabling" : "disabling"); | 676 | deb_xfer("%s fifo\n",onoff ? "enabling" : "disabling"); |
677 | if (onoff) { | 677 | if (onoff) { |
@@ -692,7 +692,7 @@ static int dib3000mb_pid_parse(struct dvb_frontend *fe, int onoff) | |||
692 | 692 | ||
693 | static int dib3000mb_tuner_pass_ctrl(struct dvb_frontend *fe, int onoff, u8 pll_addr) | 693 | static int dib3000mb_tuner_pass_ctrl(struct dvb_frontend *fe, int onoff, u8 pll_addr) |
694 | { | 694 | { |
695 | struct dib3000_state *state = (struct dib3000_state*) fe->demodulator_priv; | 695 | struct dib3000_state *state = fe->demodulator_priv; |
696 | if (onoff) { | 696 | if (onoff) { |
697 | wr(DIB3000MB_REG_TUNER, DIB3000_TUNER_WRITE_ENABLE(pll_addr)); | 697 | wr(DIB3000MB_REG_TUNER, DIB3000_TUNER_WRITE_ENABLE(pll_addr)); |
698 | } else { | 698 | } else { |
@@ -709,7 +709,7 @@ struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config, | |||
709 | struct dib3000_state* state = NULL; | 709 | struct dib3000_state* state = NULL; |
710 | 710 | ||
711 | /* allocate memory for the internal state */ | 711 | /* allocate memory for the internal state */ |
712 | state = (struct dib3000_state*) kmalloc(sizeof(struct dib3000_state), GFP_KERNEL); | 712 | state = kmalloc(sizeof(struct dib3000_state), GFP_KERNEL); |
713 | if (state == NULL) | 713 | if (state == NULL) |
714 | goto error; | 714 | goto error; |
715 | memset(state,0,sizeof(struct dib3000_state)); | 715 | memset(state,0,sizeof(struct dib3000_state)); |