aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/ves1x93.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/ves1x93.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/ves1x93.c')
-rw-r--r--drivers/media/dvb/frontends/ves1x93.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/media/dvb/frontends/ves1x93.c b/drivers/media/dvb/frontends/ves1x93.c
index edcad283aa86..821df8e839d0 100644
--- a/drivers/media/dvb/frontends/ves1x93.c
+++ b/drivers/media/dvb/frontends/ves1x93.c
@@ -263,7 +263,7 @@ static int ves1x93_set_symbolrate (struct ves1x93_state* state, u32 srate)
263 263
264static int ves1x93_init (struct dvb_frontend* fe) 264static int ves1x93_init (struct dvb_frontend* fe)
265{ 265{
266 struct ves1x93_state* state = (struct ves1x93_state*) fe->demodulator_priv; 266 struct ves1x93_state* state = fe->demodulator_priv;
267 int i; 267 int i;
268 int val; 268 int val;
269 269
@@ -289,7 +289,7 @@ static int ves1x93_init (struct dvb_frontend* fe)
289 289
290static int ves1x93_set_voltage (struct dvb_frontend* fe, fe_sec_voltage_t voltage) 290static int ves1x93_set_voltage (struct dvb_frontend* fe, fe_sec_voltage_t voltage)
291{ 291{
292 struct ves1x93_state* state = (struct ves1x93_state*) fe->demodulator_priv; 292 struct ves1x93_state* state = fe->demodulator_priv;
293 293
294 switch (voltage) { 294 switch (voltage) {
295 case SEC_VOLTAGE_13: 295 case SEC_VOLTAGE_13:
@@ -305,7 +305,7 @@ static int ves1x93_set_voltage (struct dvb_frontend* fe, fe_sec_voltage_t voltag
305 305
306static int ves1x93_read_status(struct dvb_frontend* fe, fe_status_t* status) 306static int ves1x93_read_status(struct dvb_frontend* fe, fe_status_t* status)
307{ 307{
308 struct ves1x93_state* state = (struct ves1x93_state*) fe->demodulator_priv; 308 struct ves1x93_state* state = fe->demodulator_priv;
309 309
310 u8 sync = ves1x93_readreg (state, 0x0e); 310 u8 sync = ves1x93_readreg (state, 0x0e);
311 311
@@ -346,7 +346,7 @@ static int ves1x93_read_status(struct dvb_frontend* fe, fe_status_t* status)
346 346
347static int ves1x93_read_ber(struct dvb_frontend* fe, u32* ber) 347static int ves1x93_read_ber(struct dvb_frontend* fe, u32* ber)
348{ 348{
349 struct ves1x93_state* state = (struct ves1x93_state*) fe->demodulator_priv; 349 struct ves1x93_state* state = fe->demodulator_priv;
350 350
351 *ber = ves1x93_readreg (state, 0x15); 351 *ber = ves1x93_readreg (state, 0x15);
352 *ber |= (ves1x93_readreg (state, 0x16) << 8); 352 *ber |= (ves1x93_readreg (state, 0x16) << 8);
@@ -358,7 +358,7 @@ static int ves1x93_read_ber(struct dvb_frontend* fe, u32* ber)
358 358
359static int ves1x93_read_signal_strength(struct dvb_frontend* fe, u16* strength) 359static int ves1x93_read_signal_strength(struct dvb_frontend* fe, u16* strength)
360{ 360{
361 struct ves1x93_state* state = (struct ves1x93_state*) fe->demodulator_priv; 361 struct ves1x93_state* state = fe->demodulator_priv;
362 362
363 u8 signal = ~ves1x93_readreg (state, 0x0b); 363 u8 signal = ~ves1x93_readreg (state, 0x0b);
364 *strength = (signal << 8) | signal; 364 *strength = (signal << 8) | signal;
@@ -368,7 +368,7 @@ static int ves1x93_read_signal_strength(struct dvb_frontend* fe, u16* strength)
368 368
369static int ves1x93_read_snr(struct dvb_frontend* fe, u16* snr) 369static int ves1x93_read_snr(struct dvb_frontend* fe, u16* snr)
370{ 370{
371 struct ves1x93_state* state = (struct ves1x93_state*) fe->demodulator_priv; 371 struct ves1x93_state* state = fe->demodulator_priv;
372 372
373 u8 _snr = ~ves1x93_readreg (state, 0x1c); 373 u8 _snr = ~ves1x93_readreg (state, 0x1c);
374 *snr = (_snr << 8) | _snr; 374 *snr = (_snr << 8) | _snr;
@@ -378,7 +378,7 @@ static int ves1x93_read_snr(struct dvb_frontend* fe, u16* snr)
378 378
379static int ves1x93_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) 379static int ves1x93_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
380{ 380{
381 struct ves1x93_state* state = (struct ves1x93_state*) fe->demodulator_priv; 381 struct ves1x93_state* state = fe->demodulator_priv;
382 382
383 *ucblocks = ves1x93_readreg (state, 0x18) & 0x7f; 383 *ucblocks = ves1x93_readreg (state, 0x18) & 0x7f;
384 384
@@ -393,7 +393,7 @@ static int ves1x93_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
393 393
394static int ves1x93_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) 394static int ves1x93_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p)
395{ 395{
396 struct ves1x93_state* state = (struct ves1x93_state*) fe->demodulator_priv; 396 struct ves1x93_state* state = fe->demodulator_priv;
397 397
398 ves1x93_writereg(state, 0x00, 0x11); 398 ves1x93_writereg(state, 0x00, 0x11);
399 state->config->pll_set(fe, p); 399 state->config->pll_set(fe, p);
@@ -408,7 +408,7 @@ static int ves1x93_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
408 408
409static int ves1x93_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) 409static int ves1x93_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p)
410{ 410{
411 struct ves1x93_state* state = (struct ves1x93_state*) fe->demodulator_priv; 411 struct ves1x93_state* state = fe->demodulator_priv;
412 int afc; 412 int afc;
413 413
414 afc = ((int)((char)(ves1x93_readreg (state, 0x0a) << 1)))/2; 414 afc = ((int)((char)(ves1x93_readreg (state, 0x0a) << 1)))/2;
@@ -431,14 +431,14 @@ static int ves1x93_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
431 431
432static int ves1x93_sleep(struct dvb_frontend* fe) 432static int ves1x93_sleep(struct dvb_frontend* fe)
433{ 433{
434 struct ves1x93_state* state = (struct ves1x93_state*) fe->demodulator_priv; 434 struct ves1x93_state* state = fe->demodulator_priv;
435 435
436 return ves1x93_writereg (state, 0x00, 0x08); 436 return ves1x93_writereg (state, 0x00, 0x08);
437} 437}
438 438
439static void ves1x93_release(struct dvb_frontend* fe) 439static void ves1x93_release(struct dvb_frontend* fe)
440{ 440{
441 struct ves1x93_state* state = (struct ves1x93_state*) fe->demodulator_priv; 441 struct ves1x93_state* state = fe->demodulator_priv;
442 kfree(state); 442 kfree(state);
443} 443}
444 444
@@ -451,7 +451,7 @@ struct dvb_frontend* ves1x93_attach(const struct ves1x93_config* config,
451 u8 identity; 451 u8 identity;
452 452
453 /* allocate memory for the internal state */ 453 /* allocate memory for the internal state */
454 state = (struct ves1x93_state*) kmalloc(sizeof(struct ves1x93_state), GFP_KERNEL); 454 state = kmalloc(sizeof(struct ves1x93_state), GFP_KERNEL);
455 if (state == NULL) goto error; 455 if (state == NULL) goto error;
456 456
457 /* setup the state */ 457 /* setup the state */