aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/nxt2002.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/nxt2002.c')
-rw-r--r--drivers/media/dvb/frontends/nxt2002.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/media/dvb/frontends/nxt2002.c b/drivers/media/dvb/frontends/nxt2002.c
index 4743aa17406e..35a1d60f1927 100644
--- a/drivers/media/dvb/frontends/nxt2002.c
+++ b/drivers/media/dvb/frontends/nxt2002.c
@@ -241,7 +241,7 @@ static void nxt2002_agc_reset(struct nxt2002_state* state)
241static int nxt2002_load_firmware (struct dvb_frontend* fe, const struct firmware *fw) 241static int nxt2002_load_firmware (struct dvb_frontend* fe, const struct firmware *fw)
242{ 242{
243 243
244 struct nxt2002_state* state = (struct nxt2002_state*) fe->demodulator_priv; 244 struct nxt2002_state* state = fe->demodulator_priv;
245 u8 buf[256],written = 0,chunkpos = 0; 245 u8 buf[256],written = 0,chunkpos = 0;
246 u16 rambase,position,crc = 0; 246 u16 rambase,position,crc = 0;
247 247
@@ -309,7 +309,7 @@ static int nxt2002_load_firmware (struct dvb_frontend* fe, const struct firmware
309static int nxt2002_setup_frontend_parameters (struct dvb_frontend* fe, 309static int nxt2002_setup_frontend_parameters (struct dvb_frontend* fe,
310 struct dvb_frontend_parameters *p) 310 struct dvb_frontend_parameters *p)
311{ 311{
312 struct nxt2002_state* state = (struct nxt2002_state*) fe->demodulator_priv; 312 struct nxt2002_state* state = fe->demodulator_priv;
313 u32 freq = 0; 313 u32 freq = 0;
314 u16 tunerfreq = 0; 314 u16 tunerfreq = 0;
315 u8 buf[4]; 315 u8 buf[4];
@@ -343,8 +343,6 @@ static int nxt2002_setup_frontend_parameters (struct dvb_frontend* fe,
343 /* reset the agc now that tuning has been completed */ 343 /* reset the agc now that tuning has been completed */
344 nxt2002_agc_reset(state); 344 nxt2002_agc_reset(state);
345 345
346
347
348 /* set target power level */ 346 /* set target power level */
349 switch (p->u.vsb.modulation) { 347 switch (p->u.vsb.modulation) {
350 case QAM_64: 348 case QAM_64:
@@ -453,7 +451,7 @@ static int nxt2002_setup_frontend_parameters (struct dvb_frontend* fe,
453 451
454static int nxt2002_read_status(struct dvb_frontend* fe, fe_status_t* status) 452static int nxt2002_read_status(struct dvb_frontend* fe, fe_status_t* status)
455{ 453{
456 struct nxt2002_state* state = (struct nxt2002_state*) fe->demodulator_priv; 454 struct nxt2002_state* state = fe->demodulator_priv;
457 u8 lock; 455 u8 lock;
458 i2c_readbytes(state,0x31,&lock,1); 456 i2c_readbytes(state,0x31,&lock,1);
459 457
@@ -470,7 +468,7 @@ static int nxt2002_read_status(struct dvb_frontend* fe, fe_status_t* status)
470 468
471static int nxt2002_read_ber(struct dvb_frontend* fe, u32* ber) 469static int nxt2002_read_ber(struct dvb_frontend* fe, u32* ber)
472{ 470{
473 struct nxt2002_state* state = (struct nxt2002_state*) fe->demodulator_priv; 471 struct nxt2002_state* state = fe->demodulator_priv;
474 u8 b[3]; 472 u8 b[3];
475 473
476 nxt2002_readreg_multibyte(state,0xE6,b,3); 474 nxt2002_readreg_multibyte(state,0xE6,b,3);
@@ -482,7 +480,7 @@ static int nxt2002_read_ber(struct dvb_frontend* fe, u32* ber)
482 480
483static int nxt2002_read_signal_strength(struct dvb_frontend* fe, u16* strength) 481static int nxt2002_read_signal_strength(struct dvb_frontend* fe, u16* strength)
484{ 482{
485 struct nxt2002_state* state = (struct nxt2002_state*) fe->demodulator_priv; 483 struct nxt2002_state* state = fe->demodulator_priv;
486 u8 b[2]; 484 u8 b[2];
487 u16 temp = 0; 485 u16 temp = 0;
488 486
@@ -502,7 +500,7 @@ static int nxt2002_read_signal_strength(struct dvb_frontend* fe, u16* strength)
502static int nxt2002_read_snr(struct dvb_frontend* fe, u16* snr) 500static int nxt2002_read_snr(struct dvb_frontend* fe, u16* snr)
503{ 501{
504 502
505 struct nxt2002_state* state = (struct nxt2002_state*) fe->demodulator_priv; 503 struct nxt2002_state* state = fe->demodulator_priv;
506 u8 b[2]; 504 u8 b[2];
507 u16 temp = 0, temp2; 505 u16 temp = 0, temp2;
508 u32 snrdb = 0; 506 u32 snrdb = 0;
@@ -536,7 +534,7 @@ static int nxt2002_read_snr(struct dvb_frontend* fe, u16* snr)
536 534
537static int nxt2002_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) 535static int nxt2002_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
538{ 536{
539 struct nxt2002_state* state = (struct nxt2002_state*) fe->demodulator_priv; 537 struct nxt2002_state* state = fe->demodulator_priv;
540 u8 b[3]; 538 u8 b[3];
541 539
542 nxt2002_readreg_multibyte(state,0xE6,b,3); 540 nxt2002_readreg_multibyte(state,0xE6,b,3);
@@ -552,7 +550,7 @@ static int nxt2002_sleep(struct dvb_frontend* fe)
552 550
553static int nxt2002_init(struct dvb_frontend* fe) 551static int nxt2002_init(struct dvb_frontend* fe)
554{ 552{
555 struct nxt2002_state* state = (struct nxt2002_state*) fe->demodulator_priv; 553 struct nxt2002_state* state = fe->demodulator_priv;
556 const struct firmware *fw; 554 const struct firmware *fw;
557 int ret; 555 int ret;
558 u8 buf[2]; 556 u8 buf[2];
@@ -624,7 +622,7 @@ static int nxt2002_get_tune_settings(struct dvb_frontend* fe, struct dvb_fronten
624 622
625static void nxt2002_release(struct dvb_frontend* fe) 623static void nxt2002_release(struct dvb_frontend* fe)
626{ 624{
627 struct nxt2002_state* state = (struct nxt2002_state*) fe->demodulator_priv; 625 struct nxt2002_state* state = fe->demodulator_priv;
628 kfree(state); 626 kfree(state);
629} 627}
630 628
@@ -637,7 +635,7 @@ struct dvb_frontend* nxt2002_attach(const struct nxt2002_config* config,
637 u8 buf [] = {0,0,0,0,0}; 635 u8 buf [] = {0,0,0,0,0};
638 636
639 /* allocate memory for the internal state */ 637 /* allocate memory for the internal state */
640 state = (struct nxt2002_state*) kmalloc(sizeof(struct nxt2002_state), GFP_KERNEL); 638 state = kmalloc(sizeof(struct nxt2002_state), GFP_KERNEL);
641 if (state == NULL) goto error; 639 if (state == NULL) goto error;
642 640
643 /* setup the state */ 641 /* setup the state */