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/at76c651.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/at76c651.c')
-rw-r--r-- | drivers/media/dvb/frontends/at76c651.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/dvb/frontends/at76c651.c b/drivers/media/dvb/frontends/at76c651.c index ce2eaa1640e8..72a2b5455b0b 100644 --- a/drivers/media/dvb/frontends/at76c651.c +++ b/drivers/media/dvb/frontends/at76c651.c | |||
@@ -259,7 +259,7 @@ static int at76c651_set_parameters(struct dvb_frontend* fe, | |||
259 | struct dvb_frontend_parameters *p) | 259 | struct dvb_frontend_parameters *p) |
260 | { | 260 | { |
261 | int ret; | 261 | int ret; |
262 | struct at76c651_state* state = (struct at76c651_state*) fe->demodulator_priv; | 262 | struct at76c651_state* state = fe->demodulator_priv; |
263 | 263 | ||
264 | at76c651_writereg(state, 0x0c, 0xc3); | 264 | at76c651_writereg(state, 0x0c, 0xc3); |
265 | state->config->pll_set(fe, p); | 265 | state->config->pll_set(fe, p); |
@@ -276,7 +276,7 @@ static int at76c651_set_parameters(struct dvb_frontend* fe, | |||
276 | 276 | ||
277 | static int at76c651_set_defaults(struct dvb_frontend* fe) | 277 | static int at76c651_set_defaults(struct dvb_frontend* fe) |
278 | { | 278 | { |
279 | struct at76c651_state* state = (struct at76c651_state*) fe->demodulator_priv; | 279 | struct at76c651_state* state = fe->demodulator_priv; |
280 | 280 | ||
281 | at76c651_set_symbol_rate(state, 6900000); | 281 | at76c651_set_symbol_rate(state, 6900000); |
282 | at76c651_set_qam(state, QAM_64); | 282 | at76c651_set_qam(state, QAM_64); |
@@ -294,7 +294,7 @@ static int at76c651_set_defaults(struct dvb_frontend* fe) | |||
294 | 294 | ||
295 | static int at76c651_read_status(struct dvb_frontend* fe, fe_status_t* status) | 295 | static int at76c651_read_status(struct dvb_frontend* fe, fe_status_t* status) |
296 | { | 296 | { |
297 | struct at76c651_state* state = (struct at76c651_state*) fe->demodulator_priv; | 297 | struct at76c651_state* state = fe->demodulator_priv; |
298 | u8 sync; | 298 | u8 sync; |
299 | 299 | ||
300 | /* | 300 | /* |
@@ -319,7 +319,7 @@ static int at76c651_read_status(struct dvb_frontend* fe, fe_status_t* status) | |||
319 | 319 | ||
320 | static int at76c651_read_ber(struct dvb_frontend* fe, u32* ber) | 320 | static int at76c651_read_ber(struct dvb_frontend* fe, u32* ber) |
321 | { | 321 | { |
322 | struct at76c651_state* state = (struct at76c651_state*) fe->demodulator_priv; | 322 | struct at76c651_state* state = fe->demodulator_priv; |
323 | 323 | ||
324 | *ber = (at76c651_readreg(state, 0x81) & 0x0F) << 16; | 324 | *ber = (at76c651_readreg(state, 0x81) & 0x0F) << 16; |
325 | *ber |= at76c651_readreg(state, 0x82) << 8; | 325 | *ber |= at76c651_readreg(state, 0x82) << 8; |
@@ -331,7 +331,7 @@ static int at76c651_read_ber(struct dvb_frontend* fe, u32* ber) | |||
331 | 331 | ||
332 | static int at76c651_read_signal_strength(struct dvb_frontend* fe, u16* strength) | 332 | static int at76c651_read_signal_strength(struct dvb_frontend* fe, u16* strength) |
333 | { | 333 | { |
334 | struct at76c651_state* state = (struct at76c651_state*) fe->demodulator_priv; | 334 | struct at76c651_state* state = fe->demodulator_priv; |
335 | 335 | ||
336 | u8 gain = ~at76c651_readreg(state, 0x91); | 336 | u8 gain = ~at76c651_readreg(state, 0x91); |
337 | *strength = (gain << 8) | gain; | 337 | *strength = (gain << 8) | gain; |
@@ -341,7 +341,7 @@ static int at76c651_read_signal_strength(struct dvb_frontend* fe, u16* strength) | |||
341 | 341 | ||
342 | static int at76c651_read_snr(struct dvb_frontend* fe, u16* snr) | 342 | static int at76c651_read_snr(struct dvb_frontend* fe, u16* snr) |
343 | { | 343 | { |
344 | struct at76c651_state* state = (struct at76c651_state*) fe->demodulator_priv; | 344 | struct at76c651_state* state = fe->demodulator_priv; |
345 | 345 | ||
346 | *snr = 0xFFFF - | 346 | *snr = 0xFFFF - |
347 | ((at76c651_readreg(state, 0x8F) << 8) | | 347 | ((at76c651_readreg(state, 0x8F) << 8) | |
@@ -352,7 +352,7 @@ static int at76c651_read_snr(struct dvb_frontend* fe, u16* snr) | |||
352 | 352 | ||
353 | static int at76c651_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) | 353 | static int at76c651_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) |
354 | { | 354 | { |
355 | struct at76c651_state* state = (struct at76c651_state*) fe->demodulator_priv; | 355 | struct at76c651_state* state = fe->demodulator_priv; |
356 | 356 | ||
357 | *ucblocks = at76c651_readreg(state, 0x82); | 357 | *ucblocks = at76c651_readreg(state, 0x82); |
358 | 358 | ||
@@ -369,7 +369,7 @@ static int at76c651_get_tune_settings(struct dvb_frontend* fe, struct dvb_fronte | |||
369 | 369 | ||
370 | static void at76c651_release(struct dvb_frontend* fe) | 370 | static void at76c651_release(struct dvb_frontend* fe) |
371 | { | 371 | { |
372 | struct at76c651_state* state = (struct at76c651_state*) fe->demodulator_priv; | 372 | struct at76c651_state* state = fe->demodulator_priv; |
373 | kfree(state); | 373 | kfree(state); |
374 | } | 374 | } |
375 | 375 | ||
@@ -381,7 +381,7 @@ struct dvb_frontend* at76c651_attach(const struct at76c651_config* config, | |||
381 | struct at76c651_state* state = NULL; | 381 | struct at76c651_state* state = NULL; |
382 | 382 | ||
383 | /* allocate memory for the internal state */ | 383 | /* allocate memory for the internal state */ |
384 | state = (struct at76c651_state*) kmalloc(sizeof(struct at76c651_state), GFP_KERNEL); | 384 | state = kmalloc(sizeof(struct at76c651_state), GFP_KERNEL); |
385 | if (state == NULL) goto error; | 385 | if (state == NULL) goto error; |
386 | 386 | ||
387 | /* setup the state */ | 387 | /* setup the state */ |