aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/sp887x.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/sp887x.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/sp887x.c')
-rw-r--r--drivers/media/dvb/frontends/sp887x.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/media/dvb/frontends/sp887x.c b/drivers/media/dvb/frontends/sp887x.c
index 7eae833ece49..d868a6927a16 100644
--- a/drivers/media/dvb/frontends/sp887x.c
+++ b/drivers/media/dvb/frontends/sp887x.c
@@ -135,7 +135,7 @@ static void sp887x_setup_agc (struct sp887x_state* state)
135 */ 135 */
136static int sp887x_initial_setup (struct dvb_frontend* fe, const struct firmware *fw) 136static int sp887x_initial_setup (struct dvb_frontend* fe, const struct firmware *fw)
137{ 137{
138 struct sp887x_state* state = (struct sp887x_state*) fe->demodulator_priv; 138 struct sp887x_state* state = fe->demodulator_priv;
139 u8 buf [BLOCKSIZE+2]; 139 u8 buf [BLOCKSIZE+2];
140 int i; 140 int i;
141 int fw_size = fw->size; 141 int fw_size = fw->size;
@@ -344,7 +344,7 @@ static void sp887x_correct_offsets (struct sp887x_state* state,
344static int sp887x_setup_frontend_parameters (struct dvb_frontend* fe, 344static int sp887x_setup_frontend_parameters (struct dvb_frontend* fe,
345 struct dvb_frontend_parameters *p) 345 struct dvb_frontend_parameters *p)
346{ 346{
347 struct sp887x_state* state = (struct sp887x_state*) fe->demodulator_priv; 347 struct sp887x_state* state = fe->demodulator_priv;
348 int actual_freq, err; 348 int actual_freq, err;
349 u16 val, reg0xc05; 349 u16 val, reg0xc05;
350 350
@@ -405,7 +405,7 @@ static int sp887x_setup_frontend_parameters (struct dvb_frontend* fe,
405 405
406static int sp887x_read_status(struct dvb_frontend* fe, fe_status_t* status) 406static int sp887x_read_status(struct dvb_frontend* fe, fe_status_t* status)
407{ 407{
408 struct sp887x_state* state = (struct sp887x_state*) fe->demodulator_priv; 408 struct sp887x_state* state = fe->demodulator_priv;
409 u16 snr12 = sp887x_readreg(state, 0xf16); 409 u16 snr12 = sp887x_readreg(state, 0xf16);
410 u16 sync0x200 = sp887x_readreg(state, 0x200); 410 u16 sync0x200 = sp887x_readreg(state, 0x200);
411 u16 sync0xf17 = sp887x_readreg(state, 0xf17); 411 u16 sync0xf17 = sp887x_readreg(state, 0xf17);
@@ -439,7 +439,7 @@ static int sp887x_read_status(struct dvb_frontend* fe, fe_status_t* status)
439 439
440static int sp887x_read_ber(struct dvb_frontend* fe, u32* ber) 440static int sp887x_read_ber(struct dvb_frontend* fe, u32* ber)
441{ 441{
442 struct sp887x_state* state = (struct sp887x_state*) fe->demodulator_priv; 442 struct sp887x_state* state = fe->demodulator_priv;
443 443
444 *ber = (sp887x_readreg(state, 0xc08) & 0x3f) | 444 *ber = (sp887x_readreg(state, 0xc08) & 0x3f) |
445 (sp887x_readreg(state, 0xc07) << 6); 445 (sp887x_readreg(state, 0xc07) << 6);
@@ -453,7 +453,7 @@ static int sp887x_read_ber(struct dvb_frontend* fe, u32* ber)
453 453
454static int sp887x_read_signal_strength(struct dvb_frontend* fe, u16* strength) 454static int sp887x_read_signal_strength(struct dvb_frontend* fe, u16* strength)
455{ 455{
456 struct sp887x_state* state = (struct sp887x_state*) fe->demodulator_priv; 456 struct sp887x_state* state = fe->demodulator_priv;
457 457
458 u16 snr12 = sp887x_readreg(state, 0xf16); 458 u16 snr12 = sp887x_readreg(state, 0xf16);
459 u32 signal = 3 * (snr12 << 4); 459 u32 signal = 3 * (snr12 << 4);
@@ -464,7 +464,7 @@ static int sp887x_read_signal_strength(struct dvb_frontend* fe, u16* strength)
464 464
465static int sp887x_read_snr(struct dvb_frontend* fe, u16* snr) 465static int sp887x_read_snr(struct dvb_frontend* fe, u16* snr)
466{ 466{
467 struct sp887x_state* state = (struct sp887x_state*) fe->demodulator_priv; 467 struct sp887x_state* state = fe->demodulator_priv;
468 468
469 u16 snr12 = sp887x_readreg(state, 0xf16); 469 u16 snr12 = sp887x_readreg(state, 0xf16);
470 *snr = (snr12 << 4) | (snr12 >> 8); 470 *snr = (snr12 << 4) | (snr12 >> 8);
@@ -474,7 +474,7 @@ static int sp887x_read_snr(struct dvb_frontend* fe, u16* snr)
474 474
475static int sp887x_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) 475static int sp887x_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
476{ 476{
477 struct sp887x_state* state = (struct sp887x_state*) fe->demodulator_priv; 477 struct sp887x_state* state = fe->demodulator_priv;
478 478
479 *ucblocks = sp887x_readreg(state, 0xc0c); 479 *ucblocks = sp887x_readreg(state, 0xc0c);
480 if (*ucblocks == 0xfff) 480 if (*ucblocks == 0xfff)
@@ -485,7 +485,7 @@ static int sp887x_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
485 485
486static int sp887x_sleep(struct dvb_frontend* fe) 486static int sp887x_sleep(struct dvb_frontend* fe)
487{ 487{
488 struct sp887x_state* state = (struct sp887x_state*) fe->demodulator_priv; 488 struct sp887x_state* state = fe->demodulator_priv;
489 489
490 /* tristate TS output and disable interface pins */ 490 /* tristate TS output and disable interface pins */
491 sp887x_writereg(state, 0xc18, 0x000); 491 sp887x_writereg(state, 0xc18, 0x000);
@@ -495,7 +495,7 @@ static int sp887x_sleep(struct dvb_frontend* fe)
495 495
496static int sp887x_init(struct dvb_frontend* fe) 496static int sp887x_init(struct dvb_frontend* fe)
497{ 497{
498 struct sp887x_state* state = (struct sp887x_state*) fe->demodulator_priv; 498 struct sp887x_state* state = fe->demodulator_priv;
499 const struct firmware *fw = NULL; 499 const struct firmware *fw = NULL;
500 int ret; 500 int ret;
501 501
@@ -534,7 +534,7 @@ static int sp887x_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend
534 534
535static void sp887x_release(struct dvb_frontend* fe) 535static void sp887x_release(struct dvb_frontend* fe)
536{ 536{
537 struct sp887x_state* state = (struct sp887x_state*) fe->demodulator_priv; 537 struct sp887x_state* state = fe->demodulator_priv;
538 kfree(state); 538 kfree(state);
539} 539}
540 540
@@ -546,7 +546,7 @@ struct dvb_frontend* sp887x_attach(const struct sp887x_config* config,
546 struct sp887x_state* state = NULL; 546 struct sp887x_state* state = NULL;
547 547
548 /* allocate memory for the internal state */ 548 /* allocate memory for the internal state */
549 state = (struct sp887x_state*) kmalloc(sizeof(struct sp887x_state), GFP_KERNEL); 549 state = kmalloc(sizeof(struct sp887x_state), GFP_KERNEL);
550 if (state == NULL) goto error; 550 if (state == NULL) goto error;
551 551
552 /* setup the state */ 552 /* setup the state */