aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/dib3000mc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/dib3000mc.c')
-rw-r--r--drivers/media/dvb/frontends/dib3000mc.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c
index 4a31c05eaecd..bb0abdc78f37 100644
--- a/drivers/media/dvb/frontends/dib3000mc.c
+++ b/drivers/media/dvb/frontends/dib3000mc.c
@@ -297,7 +297,7 @@ static int dib3000mc_set_general_cfg(struct dib3000_state *state, struct dvb_fro
297static int dib3000mc_get_frontend(struct dvb_frontend* fe, 297static int dib3000mc_get_frontend(struct dvb_frontend* fe,
298 struct dvb_frontend_parameters *fep) 298 struct dvb_frontend_parameters *fep)
299{ 299{
300 struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; 300 struct dib3000_state* state = fe->demodulator_priv;
301 struct dvb_ofdm_parameters *ofdm = &fep->u.ofdm; 301 struct dvb_ofdm_parameters *ofdm = &fep->u.ofdm;
302 fe_code_rate_t *cr; 302 fe_code_rate_t *cr;
303 u16 tps_val,cr_val; 303 u16 tps_val,cr_val;
@@ -458,7 +458,7 @@ static int dib3000mc_get_frontend(struct dvb_frontend* fe,
458static int dib3000mc_set_frontend(struct dvb_frontend* fe, 458static int dib3000mc_set_frontend(struct dvb_frontend* fe,
459 struct dvb_frontend_parameters *fep, int tuner) 459 struct dvb_frontend_parameters *fep, int tuner)
460{ 460{
461 struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; 461 struct dib3000_state* state = fe->demodulator_priv;
462 struct dvb_ofdm_parameters *ofdm = &fep->u.ofdm; 462 struct dvb_ofdm_parameters *ofdm = &fep->u.ofdm;
463 int search_state,auto_val; 463 int search_state,auto_val;
464 u16 val; 464 u16 val;
@@ -659,7 +659,7 @@ static int dib3000mc_fe_init(struct dvb_frontend* fe, int mobile_mode)
659} 659}
660static int dib3000mc_read_status(struct dvb_frontend* fe, fe_status_t *stat) 660static int dib3000mc_read_status(struct dvb_frontend* fe, fe_status_t *stat)
661{ 661{
662 struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; 662 struct dib3000_state* state = fe->demodulator_priv;
663 u16 lock = rd(DIB3000MC_REG_LOCKING); 663 u16 lock = rd(DIB3000MC_REG_LOCKING);
664 664
665 *stat = 0; 665 *stat = 0;
@@ -679,14 +679,14 @@ static int dib3000mc_read_status(struct dvb_frontend* fe, fe_status_t *stat)
679 679
680static int dib3000mc_read_ber(struct dvb_frontend* fe, u32 *ber) 680static int dib3000mc_read_ber(struct dvb_frontend* fe, u32 *ber)
681{ 681{
682 struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; 682 struct dib3000_state* state = fe->demodulator_priv;
683 *ber = ((rd(DIB3000MC_REG_BER_MSB) << 16) | rd(DIB3000MC_REG_BER_LSB)); 683 *ber = ((rd(DIB3000MC_REG_BER_MSB) << 16) | rd(DIB3000MC_REG_BER_LSB));
684 return 0; 684 return 0;
685} 685}
686 686
687static int dib3000mc_read_unc_blocks(struct dvb_frontend* fe, u32 *unc) 687static int dib3000mc_read_unc_blocks(struct dvb_frontend* fe, u32 *unc)
688{ 688{
689 struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; 689 struct dib3000_state* state = fe->demodulator_priv;
690 690
691 *unc = rd(DIB3000MC_REG_PACKET_ERROR_COUNT); 691 *unc = rd(DIB3000MC_REG_PACKET_ERROR_COUNT);
692 return 0; 692 return 0;
@@ -695,7 +695,7 @@ static int dib3000mc_read_unc_blocks(struct dvb_frontend* fe, u32 *unc)
695/* see dib3000mb.c for calculation comments */ 695/* see dib3000mb.c for calculation comments */
696static int dib3000mc_read_signal_strength(struct dvb_frontend* fe, u16 *strength) 696static int dib3000mc_read_signal_strength(struct dvb_frontend* fe, u16 *strength)
697{ 697{
698 struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; 698 struct dib3000_state* state = fe->demodulator_priv;
699 u16 val = rd(DIB3000MC_REG_SIGNAL_NOISE_LSB); 699 u16 val = rd(DIB3000MC_REG_SIGNAL_NOISE_LSB);
700 *strength = (((val >> 6) & 0xff) << 8) + (val & 0x3f); 700 *strength = (((val >> 6) & 0xff) << 8) + (val & 0x3f);
701 701
@@ -706,7 +706,7 @@ static int dib3000mc_read_signal_strength(struct dvb_frontend* fe, u16 *strength
706/* see dib3000mb.c for calculation comments */ 706/* see dib3000mb.c for calculation comments */
707static int dib3000mc_read_snr(struct dvb_frontend* fe, u16 *snr) 707static int dib3000mc_read_snr(struct dvb_frontend* fe, u16 *snr)
708{ 708{
709 struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; 709 struct dib3000_state* state = fe->demodulator_priv;
710 u16 val = rd(DIB3000MC_REG_SIGNAL_NOISE_LSB), 710 u16 val = rd(DIB3000MC_REG_SIGNAL_NOISE_LSB),
711 val2 = rd(DIB3000MC_REG_SIGNAL_NOISE_MSB); 711 val2 = rd(DIB3000MC_REG_SIGNAL_NOISE_MSB);
712 u16 sig,noise; 712 u16 sig,noise;
@@ -726,7 +726,7 @@ static int dib3000mc_read_snr(struct dvb_frontend* fe, u16 *snr)
726 726
727static int dib3000mc_sleep(struct dvb_frontend* fe) 727static int dib3000mc_sleep(struct dvb_frontend* fe)
728{ 728{
729 struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; 729 struct dib3000_state* state = fe->demodulator_priv;
730 730
731 set_or(DIB3000MC_REG_CLK_CFG_7,DIB3000MC_CLK_CFG_7_PWR_DOWN); 731 set_or(DIB3000MC_REG_CLK_CFG_7,DIB3000MC_CLK_CFG_7_PWR_DOWN);
732 wr(DIB3000MC_REG_CLK_CFG_1,DIB3000MC_CLK_CFG_1_POWER_DOWN); 732 wr(DIB3000MC_REG_CLK_CFG_1,DIB3000MC_CLK_CFG_1_POWER_DOWN);
@@ -756,7 +756,7 @@ static int dib3000mc_set_frontend_and_tuner(struct dvb_frontend* fe, struct dvb_
756 756
757static void dib3000mc_release(struct dvb_frontend* fe) 757static void dib3000mc_release(struct dvb_frontend* fe)
758{ 758{
759 struct dib3000_state *state = (struct dib3000_state *) fe->demodulator_priv; 759 struct dib3000_state *state = fe->demodulator_priv;
760 kfree(state); 760 kfree(state);
761} 761}
762 762
@@ -771,7 +771,7 @@ static int dib3000mc_pid_control(struct dvb_frontend *fe,int index, int pid,int
771 771
772static int dib3000mc_fifo_control(struct dvb_frontend *fe, int onoff) 772static int dib3000mc_fifo_control(struct dvb_frontend *fe, int onoff)
773{ 773{
774 struct dib3000_state *state = (struct dib3000_state*) fe->demodulator_priv; 774 struct dib3000_state *state = fe->demodulator_priv;
775 u16 tmp = rd(DIB3000MC_REG_SMO_MODE); 775 u16 tmp = rd(DIB3000MC_REG_SMO_MODE);
776 776
777 deb_xfer("%s fifo\n",onoff ? "enabling" : "disabling"); 777 deb_xfer("%s fifo\n",onoff ? "enabling" : "disabling");
@@ -803,7 +803,7 @@ static int dib3000mc_pid_parse(struct dvb_frontend *fe, int onoff)
803 803
804static int dib3000mc_tuner_pass_ctrl(struct dvb_frontend *fe, int onoff, u8 pll_addr) 804static int dib3000mc_tuner_pass_ctrl(struct dvb_frontend *fe, int onoff, u8 pll_addr)
805{ 805{
806 struct dib3000_state *state = (struct dib3000_state*) fe->demodulator_priv; 806 struct dib3000_state *state = fe->demodulator_priv;
807 if (onoff) { 807 if (onoff) {
808 wr(DIB3000MC_REG_TUNER, DIB3000_TUNER_WRITE_ENABLE(pll_addr)); 808 wr(DIB3000MC_REG_TUNER, DIB3000_TUNER_WRITE_ENABLE(pll_addr));
809 } else { 809 } else {
@@ -844,7 +844,7 @@ struct dvb_frontend* dib3000mc_attach(const struct dib3000_config* config,
844 u16 devid; 844 u16 devid;
845 845
846 /* allocate memory for the internal state */ 846 /* allocate memory for the internal state */
847 state = (struct dib3000_state*) kmalloc(sizeof(struct dib3000_state), GFP_KERNEL); 847 state = kmalloc(sizeof(struct dib3000_state), GFP_KERNEL);
848 if (state == NULL) 848 if (state == NULL)
849 goto error; 849 goto error;
850 memset(state,0,sizeof(struct dib3000_state)); 850 memset(state,0,sizeof(struct dib3000_state));