diff options
author | Johannes Stezenbach <js@linuxtv.org> | 2005-05-17 00:54:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-17 10:59:30 -0400 |
commit | b8742700f13163ffa00cddce2a3c940b9ab2ab5a (patch) | |
tree | ff82ac83508dc63d0dec63a3479df3b966018b34 /drivers/media/dvb/frontends/stv0297.c | |
parent | 591ad98db3be2cd596ac5e0cfba7b164c3bdfb52 (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/stv0297.c')
-rw-r--r-- | drivers/media/dvb/frontends/stv0297.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/media/dvb/frontends/stv0297.c b/drivers/media/dvb/frontends/stv0297.c index 502c6403dfc6..e681263bf079 100644 --- a/drivers/media/dvb/frontends/stv0297.c +++ b/drivers/media/dvb/frontends/stv0297.c | |||
@@ -365,7 +365,7 @@ static int stv0297_set_inversion(struct stv0297_state *state, fe_spectral_invers | |||
365 | 365 | ||
366 | int stv0297_enable_plli2c(struct dvb_frontend *fe) | 366 | int stv0297_enable_plli2c(struct dvb_frontend *fe) |
367 | { | 367 | { |
368 | struct stv0297_state *state = (struct stv0297_state *) fe->demodulator_priv; | 368 | struct stv0297_state *state = fe->demodulator_priv; |
369 | 369 | ||
370 | stv0297_writereg(state, 0x87, 0x78); | 370 | stv0297_writereg(state, 0x87, 0x78); |
371 | stv0297_writereg(state, 0x86, 0xc8); | 371 | stv0297_writereg(state, 0x86, 0xc8); |
@@ -375,7 +375,7 @@ int stv0297_enable_plli2c(struct dvb_frontend *fe) | |||
375 | 375 | ||
376 | static int stv0297_init(struct dvb_frontend *fe) | 376 | static int stv0297_init(struct dvb_frontend *fe) |
377 | { | 377 | { |
378 | struct stv0297_state *state = (struct stv0297_state *) fe->demodulator_priv; | 378 | struct stv0297_state *state = fe->demodulator_priv; |
379 | int i; | 379 | int i; |
380 | 380 | ||
381 | /* soft reset */ | 381 | /* soft reset */ |
@@ -416,7 +416,7 @@ static int stv0297_init(struct dvb_frontend *fe) | |||
416 | 416 | ||
417 | static int stv0297_sleep(struct dvb_frontend *fe) | 417 | static int stv0297_sleep(struct dvb_frontend *fe) |
418 | { | 418 | { |
419 | struct stv0297_state *state = (struct stv0297_state *) fe->demodulator_priv; | 419 | struct stv0297_state *state = fe->demodulator_priv; |
420 | 420 | ||
421 | stv0297_writereg_mask(state, 0x80, 1, 1); | 421 | stv0297_writereg_mask(state, 0x80, 1, 1); |
422 | 422 | ||
@@ -425,7 +425,7 @@ static int stv0297_sleep(struct dvb_frontend *fe) | |||
425 | 425 | ||
426 | static int stv0297_read_status(struct dvb_frontend *fe, fe_status_t * status) | 426 | static int stv0297_read_status(struct dvb_frontend *fe, fe_status_t * status) |
427 | { | 427 | { |
428 | struct stv0297_state *state = (struct stv0297_state *) fe->demodulator_priv; | 428 | struct stv0297_state *state = fe->demodulator_priv; |
429 | 429 | ||
430 | u8 sync = stv0297_readreg(state, 0xDF); | 430 | u8 sync = stv0297_readreg(state, 0xDF); |
431 | 431 | ||
@@ -438,7 +438,7 @@ static int stv0297_read_status(struct dvb_frontend *fe, fe_status_t * status) | |||
438 | 438 | ||
439 | static int stv0297_read_ber(struct dvb_frontend *fe, u32 * ber) | 439 | static int stv0297_read_ber(struct dvb_frontend *fe, u32 * ber) |
440 | { | 440 | { |
441 | struct stv0297_state *state = (struct stv0297_state *) fe->demodulator_priv; | 441 | struct stv0297_state *state = fe->demodulator_priv; |
442 | u8 BER[3]; | 442 | u8 BER[3]; |
443 | 443 | ||
444 | stv0297_writereg(state, 0xA0, 0x80); // Start Counting bit errors for 4096 Bytes | 444 | stv0297_writereg(state, 0xA0, 0x80); // Start Counting bit errors for 4096 Bytes |
@@ -453,7 +453,7 @@ static int stv0297_read_ber(struct dvb_frontend *fe, u32 * ber) | |||
453 | 453 | ||
454 | static int stv0297_read_signal_strength(struct dvb_frontend *fe, u16 * strength) | 454 | static int stv0297_read_signal_strength(struct dvb_frontend *fe, u16 * strength) |
455 | { | 455 | { |
456 | struct stv0297_state *state = (struct stv0297_state *) fe->demodulator_priv; | 456 | struct stv0297_state *state = fe->demodulator_priv; |
457 | u8 STRENGTH[2]; | 457 | u8 STRENGTH[2]; |
458 | 458 | ||
459 | stv0297_readregs(state, 0x41, STRENGTH, 2); | 459 | stv0297_readregs(state, 0x41, STRENGTH, 2); |
@@ -464,7 +464,7 @@ static int stv0297_read_signal_strength(struct dvb_frontend *fe, u16 * strength) | |||
464 | 464 | ||
465 | static int stv0297_read_snr(struct dvb_frontend *fe, u16 * snr) | 465 | static int stv0297_read_snr(struct dvb_frontend *fe, u16 * snr) |
466 | { | 466 | { |
467 | struct stv0297_state *state = (struct stv0297_state *) fe->demodulator_priv; | 467 | struct stv0297_state *state = fe->demodulator_priv; |
468 | u8 SNR[2]; | 468 | u8 SNR[2]; |
469 | 469 | ||
470 | stv0297_readregs(state, 0x07, SNR, 2); | 470 | stv0297_readregs(state, 0x07, SNR, 2); |
@@ -475,7 +475,7 @@ static int stv0297_read_snr(struct dvb_frontend *fe, u16 * snr) | |||
475 | 475 | ||
476 | static int stv0297_read_ucblocks(struct dvb_frontend *fe, u32 * ucblocks) | 476 | static int stv0297_read_ucblocks(struct dvb_frontend *fe, u32 * ucblocks) |
477 | { | 477 | { |
478 | struct stv0297_state *state = (struct stv0297_state *) fe->demodulator_priv; | 478 | struct stv0297_state *state = fe->demodulator_priv; |
479 | 479 | ||
480 | *ucblocks = (stv0297_readreg(state, 0xD5) << 8) | 480 | *ucblocks = (stv0297_readreg(state, 0xD5) << 8) |
481 | | stv0297_readreg(state, 0xD4); | 481 | | stv0297_readreg(state, 0xD4); |
@@ -485,7 +485,7 @@ static int stv0297_read_ucblocks(struct dvb_frontend *fe, u32 * ucblocks) | |||
485 | 485 | ||
486 | static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p) | 486 | static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p) |
487 | { | 487 | { |
488 | struct stv0297_state *state = (struct stv0297_state *) fe->demodulator_priv; | 488 | struct stv0297_state *state = fe->demodulator_priv; |
489 | int u_threshold; | 489 | int u_threshold; |
490 | int initial_u; | 490 | int initial_u; |
491 | int blind_u; | 491 | int blind_u; |
@@ -689,7 +689,7 @@ timeout: | |||
689 | 689 | ||
690 | static int stv0297_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p) | 690 | static int stv0297_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p) |
691 | { | 691 | { |
692 | struct stv0297_state *state = (struct stv0297_state *) fe->demodulator_priv; | 692 | struct stv0297_state *state = fe->demodulator_priv; |
693 | int reg_00, reg_83; | 693 | int reg_00, reg_83; |
694 | 694 | ||
695 | reg_00 = stv0297_readreg(state, 0x00); | 695 | reg_00 = stv0297_readreg(state, 0x00); |
@@ -725,7 +725,7 @@ static int stv0297_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_par | |||
725 | 725 | ||
726 | static void stv0297_release(struct dvb_frontend *fe) | 726 | static void stv0297_release(struct dvb_frontend *fe) |
727 | { | 727 | { |
728 | struct stv0297_state *state = (struct stv0297_state *) fe->demodulator_priv; | 728 | struct stv0297_state *state = fe->demodulator_priv; |
729 | kfree(state); | 729 | kfree(state); |
730 | } | 730 | } |
731 | 731 | ||
@@ -737,7 +737,7 @@ struct dvb_frontend *stv0297_attach(const struct stv0297_config *config, | |||
737 | struct stv0297_state *state = NULL; | 737 | struct stv0297_state *state = NULL; |
738 | 738 | ||
739 | /* allocate memory for the internal state */ | 739 | /* allocate memory for the internal state */ |
740 | state = (struct stv0297_state *) kmalloc(sizeof(struct stv0297_state), GFP_KERNEL); | 740 | state = kmalloc(sizeof(struct stv0297_state), GFP_KERNEL); |
741 | if (state == NULL) | 741 | if (state == NULL) |
742 | goto error; | 742 | goto error; |
743 | 743 | ||