diff options
Diffstat (limited to 'drivers/media/dvb/frontends/tda10021.c')
-rw-r--r-- | drivers/media/dvb/frontends/tda10021.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/media/dvb/frontends/tda10021.c b/drivers/media/dvb/frontends/tda10021.c index 4e40d95ee95d..87d5f4d8790f 100644 --- a/drivers/media/dvb/frontends/tda10021.c +++ b/drivers/media/dvb/frontends/tda10021.c | |||
@@ -205,7 +205,7 @@ static int tda10021_set_symbolrate (struct tda10021_state* state, u32 symbolrate | |||
205 | 205 | ||
206 | static int tda10021_init (struct dvb_frontend *fe) | 206 | static int tda10021_init (struct dvb_frontend *fe) |
207 | { | 207 | { |
208 | struct tda10021_state* state = (struct tda10021_state*) fe->demodulator_priv; | 208 | struct tda10021_state* state = fe->demodulator_priv; |
209 | int i; | 209 | int i; |
210 | 210 | ||
211 | dprintk("DVB: TDA10021(%d): init chip\n", fe->adapter->num); | 211 | dprintk("DVB: TDA10021(%d): init chip\n", fe->adapter->num); |
@@ -238,7 +238,7 @@ static int tda10021_init (struct dvb_frontend *fe) | |||
238 | static int tda10021_set_parameters (struct dvb_frontend *fe, | 238 | static int tda10021_set_parameters (struct dvb_frontend *fe, |
239 | struct dvb_frontend_parameters *p) | 239 | struct dvb_frontend_parameters *p) |
240 | { | 240 | { |
241 | struct tda10021_state* state = (struct tda10021_state*) fe->demodulator_priv; | 241 | struct tda10021_state* state = fe->demodulator_priv; |
242 | 242 | ||
243 | //table for QAM4-QAM256 ready QAM4 QAM16 QAM32 QAM64 QAM128 QAM256 | 243 | //table for QAM4-QAM256 ready QAM4 QAM16 QAM32 QAM64 QAM128 QAM256 |
244 | //CONF | 244 | //CONF |
@@ -278,7 +278,7 @@ static int tda10021_set_parameters (struct dvb_frontend *fe, | |||
278 | 278 | ||
279 | static int tda10021_read_status(struct dvb_frontend* fe, fe_status_t* status) | 279 | static int tda10021_read_status(struct dvb_frontend* fe, fe_status_t* status) |
280 | { | 280 | { |
281 | struct tda10021_state* state = (struct tda10021_state*) fe->demodulator_priv; | 281 | struct tda10021_state* state = fe->demodulator_priv; |
282 | int sync; | 282 | int sync; |
283 | 283 | ||
284 | *status = 0; | 284 | *status = 0; |
@@ -303,7 +303,7 @@ static int tda10021_read_status(struct dvb_frontend* fe, fe_status_t* status) | |||
303 | 303 | ||
304 | static int tda10021_read_ber(struct dvb_frontend* fe, u32* ber) | 304 | static int tda10021_read_ber(struct dvb_frontend* fe, u32* ber) |
305 | { | 305 | { |
306 | struct tda10021_state* state = (struct tda10021_state*) fe->demodulator_priv; | 306 | struct tda10021_state* state = fe->demodulator_priv; |
307 | 307 | ||
308 | u32 _ber = tda10021_readreg(state, 0x14) | | 308 | u32 _ber = tda10021_readreg(state, 0x14) | |
309 | (tda10021_readreg(state, 0x15) << 8) | | 309 | (tda10021_readreg(state, 0x15) << 8) | |
@@ -315,7 +315,7 @@ static int tda10021_read_ber(struct dvb_frontend* fe, u32* ber) | |||
315 | 315 | ||
316 | static int tda10021_read_signal_strength(struct dvb_frontend* fe, u16* strength) | 316 | static int tda10021_read_signal_strength(struct dvb_frontend* fe, u16* strength) |
317 | { | 317 | { |
318 | struct tda10021_state* state = (struct tda10021_state*) fe->demodulator_priv; | 318 | struct tda10021_state* state = fe->demodulator_priv; |
319 | 319 | ||
320 | u8 gain = tda10021_readreg(state, 0x17); | 320 | u8 gain = tda10021_readreg(state, 0x17); |
321 | *strength = (gain << 8) | gain; | 321 | *strength = (gain << 8) | gain; |
@@ -325,7 +325,7 @@ static int tda10021_read_signal_strength(struct dvb_frontend* fe, u16* strength) | |||
325 | 325 | ||
326 | static int tda10021_read_snr(struct dvb_frontend* fe, u16* snr) | 326 | static int tda10021_read_snr(struct dvb_frontend* fe, u16* snr) |
327 | { | 327 | { |
328 | struct tda10021_state* state = (struct tda10021_state*) fe->demodulator_priv; | 328 | struct tda10021_state* state = fe->demodulator_priv; |
329 | 329 | ||
330 | u8 quality = ~tda10021_readreg(state, 0x18); | 330 | u8 quality = ~tda10021_readreg(state, 0x18); |
331 | *snr = (quality << 8) | quality; | 331 | *snr = (quality << 8) | quality; |
@@ -335,7 +335,7 @@ static int tda10021_read_snr(struct dvb_frontend* fe, u16* snr) | |||
335 | 335 | ||
336 | static int tda10021_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) | 336 | static int tda10021_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) |
337 | { | 337 | { |
338 | struct tda10021_state* state = (struct tda10021_state*) fe->demodulator_priv; | 338 | struct tda10021_state* state = fe->demodulator_priv; |
339 | 339 | ||
340 | *ucblocks = tda10021_readreg (state, 0x13) & 0x7f; | 340 | *ucblocks = tda10021_readreg (state, 0x13) & 0x7f; |
341 | if (*ucblocks == 0x7f) | 341 | if (*ucblocks == 0x7f) |
@@ -350,7 +350,7 @@ static int tda10021_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) | |||
350 | 350 | ||
351 | static int tda10021_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) | 351 | static int tda10021_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) |
352 | { | 352 | { |
353 | struct tda10021_state* state = (struct tda10021_state*) fe->demodulator_priv; | 353 | struct tda10021_state* state = fe->demodulator_priv; |
354 | int sync; | 354 | int sync; |
355 | s8 afc = 0; | 355 | s8 afc = 0; |
356 | 356 | ||
@@ -378,7 +378,7 @@ static int tda10021_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_pa | |||
378 | 378 | ||
379 | static int tda10021_sleep(struct dvb_frontend* fe) | 379 | static int tda10021_sleep(struct dvb_frontend* fe) |
380 | { | 380 | { |
381 | struct tda10021_state* state = (struct tda10021_state*) fe->demodulator_priv; | 381 | struct tda10021_state* state = fe->demodulator_priv; |
382 | 382 | ||
383 | tda10021_writereg (state, 0x1b, 0x02); /* pdown ADC */ | 383 | tda10021_writereg (state, 0x1b, 0x02); /* pdown ADC */ |
384 | tda10021_writereg (state, 0x00, 0x80); /* standby */ | 384 | tda10021_writereg (state, 0x00, 0x80); /* standby */ |
@@ -388,7 +388,7 @@ static int tda10021_sleep(struct dvb_frontend* fe) | |||
388 | 388 | ||
389 | static void tda10021_release(struct dvb_frontend* fe) | 389 | static void tda10021_release(struct dvb_frontend* fe) |
390 | { | 390 | { |
391 | struct tda10021_state* state = (struct tda10021_state*) fe->demodulator_priv; | 391 | struct tda10021_state* state = fe->demodulator_priv; |
392 | kfree(state); | 392 | kfree(state); |
393 | } | 393 | } |
394 | 394 | ||
@@ -401,7 +401,7 @@ struct dvb_frontend* tda10021_attach(const struct tda10021_config* config, | |||
401 | struct tda10021_state* state = NULL; | 401 | struct tda10021_state* state = NULL; |
402 | 402 | ||
403 | /* allocate memory for the internal state */ | 403 | /* allocate memory for the internal state */ |
404 | state = (struct tda10021_state*) kmalloc(sizeof(struct tda10021_state), GFP_KERNEL); | 404 | state = kmalloc(sizeof(struct tda10021_state), GFP_KERNEL); |
405 | if (state == NULL) goto error; | 405 | if (state == NULL) goto error; |
406 | 406 | ||
407 | /* setup the state */ | 407 | /* setup the state */ |