diff options
Diffstat (limited to 'drivers/media/dvb/frontends/cx22700.c')
| -rw-r--r-- | drivers/media/dvb/frontends/cx22700.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/dvb/frontends/cx22700.c b/drivers/media/dvb/frontends/cx22700.c index a212279042b8..0c2ed4438618 100644 --- a/drivers/media/dvb/frontends/cx22700.c +++ b/drivers/media/dvb/frontends/cx22700.c | |||
| @@ -232,7 +232,7 @@ static int cx22700_get_tps (struct cx22700_state* state, struct dvb_ofdm_paramet | |||
| 232 | 232 | ||
| 233 | static int cx22700_init (struct dvb_frontend* fe) | 233 | static int cx22700_init (struct dvb_frontend* fe) |
| 234 | 234 | ||
| 235 | { struct cx22700_state* state = (struct cx22700_state*) fe->demodulator_priv; | 235 | { struct cx22700_state* state = fe->demodulator_priv; |
| 236 | int i; | 236 | int i; |
| 237 | 237 | ||
| 238 | dprintk("cx22700_init: init chip\n"); | 238 | dprintk("cx22700_init: init chip\n"); |
| @@ -258,7 +258,7 @@ static int cx22700_init (struct dvb_frontend* fe) | |||
| 258 | 258 | ||
| 259 | static int cx22700_read_status(struct dvb_frontend* fe, fe_status_t* status) | 259 | static int cx22700_read_status(struct dvb_frontend* fe, fe_status_t* status) |
| 260 | { | 260 | { |
| 261 | struct cx22700_state* state = (struct cx22700_state*) fe->demodulator_priv; | 261 | struct cx22700_state* state = fe->demodulator_priv; |
| 262 | 262 | ||
| 263 | u16 rs_ber = (cx22700_readreg (state, 0x0d) << 9) | 263 | u16 rs_ber = (cx22700_readreg (state, 0x0d) << 9) |
| 264 | | (cx22700_readreg (state, 0x0e) << 1); | 264 | | (cx22700_readreg (state, 0x0e) << 1); |
| @@ -286,7 +286,7 @@ static int cx22700_read_status(struct dvb_frontend* fe, fe_status_t* status) | |||
| 286 | 286 | ||
| 287 | static int cx22700_read_ber(struct dvb_frontend* fe, u32* ber) | 287 | static int cx22700_read_ber(struct dvb_frontend* fe, u32* ber) |
| 288 | { | 288 | { |
| 289 | struct cx22700_state* state = (struct cx22700_state*) fe->demodulator_priv; | 289 | struct cx22700_state* state = fe->demodulator_priv; |
| 290 | 290 | ||
| 291 | *ber = cx22700_readreg (state, 0x0c) & 0x7f; | 291 | *ber = cx22700_readreg (state, 0x0c) & 0x7f; |
| 292 | cx22700_writereg (state, 0x0c, 0x00); | 292 | cx22700_writereg (state, 0x0c, 0x00); |
| @@ -296,7 +296,7 @@ static int cx22700_read_ber(struct dvb_frontend* fe, u32* ber) | |||
| 296 | 296 | ||
| 297 | static int cx22700_read_signal_strength(struct dvb_frontend* fe, u16* signal_strength) | 297 | static int cx22700_read_signal_strength(struct dvb_frontend* fe, u16* signal_strength) |
| 298 | { | 298 | { |
| 299 | struct cx22700_state* state = (struct cx22700_state*) fe->demodulator_priv; | 299 | struct cx22700_state* state = fe->demodulator_priv; |
| 300 | 300 | ||
| 301 | u16 rs_ber = (cx22700_readreg (state, 0x0d) << 9) | 301 | u16 rs_ber = (cx22700_readreg (state, 0x0d) << 9) |
| 302 | | (cx22700_readreg (state, 0x0e) << 1); | 302 | | (cx22700_readreg (state, 0x0e) << 1); |
| @@ -307,7 +307,7 @@ static int cx22700_read_signal_strength(struct dvb_frontend* fe, u16* signal_str | |||
| 307 | 307 | ||
| 308 | static int cx22700_read_snr(struct dvb_frontend* fe, u16* snr) | 308 | static int cx22700_read_snr(struct dvb_frontend* fe, u16* snr) |
| 309 | { | 309 | { |
| 310 | struct cx22700_state* state = (struct cx22700_state*) fe->demodulator_priv; | 310 | struct cx22700_state* state = fe->demodulator_priv; |
| 311 | 311 | ||
| 312 | u16 rs_ber = (cx22700_readreg (state, 0x0d) << 9) | 312 | u16 rs_ber = (cx22700_readreg (state, 0x0d) << 9) |
| 313 | | (cx22700_readreg (state, 0x0e) << 1); | 313 | | (cx22700_readreg (state, 0x0e) << 1); |
| @@ -318,7 +318,7 @@ static int cx22700_read_snr(struct dvb_frontend* fe, u16* snr) | |||
| 318 | 318 | ||
| 319 | static int cx22700_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) | 319 | static int cx22700_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) |
| 320 | { | 320 | { |
| 321 | struct cx22700_state* state = (struct cx22700_state*) fe->demodulator_priv; | 321 | struct cx22700_state* state = fe->demodulator_priv; |
| 322 | 322 | ||
| 323 | *ucblocks = cx22700_readreg (state, 0x0f); | 323 | *ucblocks = cx22700_readreg (state, 0x0f); |
| 324 | cx22700_writereg (state, 0x0f, 0x00); | 324 | cx22700_writereg (state, 0x0f, 0x00); |
| @@ -328,7 +328,7 @@ static int cx22700_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) | |||
| 328 | 328 | ||
| 329 | static int cx22700_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) | 329 | static int cx22700_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) |
| 330 | { | 330 | { |
| 331 | struct cx22700_state* state = (struct cx22700_state*) fe->demodulator_priv; | 331 | struct cx22700_state* state = fe->demodulator_priv; |
| 332 | 332 | ||
| 333 | cx22700_writereg (state, 0x00, 0x02); /* XXX CHECKME: soft reset*/ | 333 | cx22700_writereg (state, 0x00, 0x02); /* XXX CHECKME: soft reset*/ |
| 334 | cx22700_writereg (state, 0x00, 0x00); | 334 | cx22700_writereg (state, 0x00, 0x00); |
| @@ -346,7 +346,7 @@ static int cx22700_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par | |||
| 346 | 346 | ||
| 347 | static int cx22700_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) | 347 | static int cx22700_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) |
| 348 | { | 348 | { |
| 349 | struct cx22700_state* state = (struct cx22700_state*) fe->demodulator_priv; | 349 | struct cx22700_state* state = fe->demodulator_priv; |
| 350 | u8 reg09 = cx22700_readreg (state, 0x09); | 350 | u8 reg09 = cx22700_readreg (state, 0x09); |
| 351 | 351 | ||
| 352 | p->inversion = reg09 & 0x1 ? INVERSION_ON : INVERSION_OFF; | 352 | p->inversion = reg09 & 0x1 ? INVERSION_ON : INVERSION_OFF; |
| @@ -363,7 +363,7 @@ static int cx22700_get_tune_settings(struct dvb_frontend* fe, struct dvb_fronten | |||
| 363 | 363 | ||
| 364 | static void cx22700_release(struct dvb_frontend* fe) | 364 | static void cx22700_release(struct dvb_frontend* fe) |
| 365 | { | 365 | { |
| 366 | struct cx22700_state* state = (struct cx22700_state*) fe->demodulator_priv; | 366 | struct cx22700_state* state = fe->demodulator_priv; |
| 367 | kfree(state); | 367 | kfree(state); |
| 368 | } | 368 | } |
| 369 | 369 | ||
| @@ -375,7 +375,7 @@ struct dvb_frontend* cx22700_attach(const struct cx22700_config* config, | |||
| 375 | struct cx22700_state* state = NULL; | 375 | struct cx22700_state* state = NULL; |
| 376 | 376 | ||
| 377 | /* allocate memory for the internal state */ | 377 | /* allocate memory for the internal state */ |
| 378 | state = (struct cx22700_state*) kmalloc(sizeof(struct cx22700_state), GFP_KERNEL); | 378 | state = kmalloc(sizeof(struct cx22700_state), GFP_KERNEL); |
| 379 | if (state == NULL) goto error; | 379 | if (state == NULL) goto error; |
| 380 | 380 | ||
| 381 | /* setup the state */ | 381 | /* setup the state */ |
