diff options
Diffstat (limited to 'drivers/media/dvb/frontends/tda8083.c')
-rw-r--r-- | drivers/media/dvb/frontends/tda8083.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/media/dvb/frontends/tda8083.c b/drivers/media/dvb/frontends/tda8083.c index da82e90d6d13..168e013d23bd 100644 --- a/drivers/media/dvb/frontends/tda8083.c +++ b/drivers/media/dvb/frontends/tda8083.c | |||
@@ -226,7 +226,7 @@ static int tda8083_send_diseqc_burst (struct tda8083_state* state, fe_sec_mini_c | |||
226 | static int tda8083_send_diseqc_msg (struct dvb_frontend* fe, | 226 | static int tda8083_send_diseqc_msg (struct dvb_frontend* fe, |
227 | struct dvb_diseqc_master_cmd *m) | 227 | struct dvb_diseqc_master_cmd *m) |
228 | { | 228 | { |
229 | struct tda8083_state* state = (struct tda8083_state*) fe->demodulator_priv; | 229 | struct tda8083_state* state = fe->demodulator_priv; |
230 | int i; | 230 | int i; |
231 | 231 | ||
232 | tda8083_writereg (state, 0x29, (m->msg_len - 3) | (1 << 2)); /* enable */ | 232 | tda8083_writereg (state, 0x29, (m->msg_len - 3) | (1 << 2)); /* enable */ |
@@ -243,7 +243,7 @@ static int tda8083_send_diseqc_msg (struct dvb_frontend* fe, | |||
243 | 243 | ||
244 | static int tda8083_read_status(struct dvb_frontend* fe, fe_status_t* status) | 244 | static int tda8083_read_status(struct dvb_frontend* fe, fe_status_t* status) |
245 | { | 245 | { |
246 | struct tda8083_state* state = (struct tda8083_state*) fe->demodulator_priv; | 246 | struct tda8083_state* state = fe->demodulator_priv; |
247 | 247 | ||
248 | u8 signal = ~tda8083_readreg (state, 0x01); | 248 | u8 signal = ~tda8083_readreg (state, 0x01); |
249 | u8 sync = tda8083_readreg (state, 0x02); | 249 | u8 sync = tda8083_readreg (state, 0x02); |
@@ -270,7 +270,7 @@ static int tda8083_read_status(struct dvb_frontend* fe, fe_status_t* status) | |||
270 | 270 | ||
271 | static int tda8083_read_signal_strength(struct dvb_frontend* fe, u16* strength) | 271 | static int tda8083_read_signal_strength(struct dvb_frontend* fe, u16* strength) |
272 | { | 272 | { |
273 | struct tda8083_state* state = (struct tda8083_state*) fe->demodulator_priv; | 273 | struct tda8083_state* state = fe->demodulator_priv; |
274 | 274 | ||
275 | u8 signal = ~tda8083_readreg (state, 0x01); | 275 | u8 signal = ~tda8083_readreg (state, 0x01); |
276 | *strength = (signal << 8) | signal; | 276 | *strength = (signal << 8) | signal; |
@@ -280,7 +280,7 @@ static int tda8083_read_signal_strength(struct dvb_frontend* fe, u16* strength) | |||
280 | 280 | ||
281 | static int tda8083_read_snr(struct dvb_frontend* fe, u16* snr) | 281 | static int tda8083_read_snr(struct dvb_frontend* fe, u16* snr) |
282 | { | 282 | { |
283 | struct tda8083_state* state = (struct tda8083_state*) fe->demodulator_priv; | 283 | struct tda8083_state* state = fe->demodulator_priv; |
284 | 284 | ||
285 | u8 _snr = tda8083_readreg (state, 0x08); | 285 | u8 _snr = tda8083_readreg (state, 0x08); |
286 | *snr = (_snr << 8) | _snr; | 286 | *snr = (_snr << 8) | _snr; |
@@ -290,7 +290,7 @@ static int tda8083_read_snr(struct dvb_frontend* fe, u16* snr) | |||
290 | 290 | ||
291 | static int tda8083_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) | 291 | static int tda8083_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) |
292 | { | 292 | { |
293 | struct tda8083_state* state = (struct tda8083_state*) fe->demodulator_priv; | 293 | struct tda8083_state* state = fe->demodulator_priv; |
294 | 294 | ||
295 | state->config->pll_set(fe, p); | 295 | state->config->pll_set(fe, p); |
296 | tda8083_set_inversion (state, p->inversion); | 296 | tda8083_set_inversion (state, p->inversion); |
@@ -305,7 +305,7 @@ static int tda8083_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par | |||
305 | 305 | ||
306 | static int tda8083_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) | 306 | static int tda8083_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) |
307 | { | 307 | { |
308 | struct tda8083_state* state = (struct tda8083_state*) fe->demodulator_priv; | 308 | struct tda8083_state* state = fe->demodulator_priv; |
309 | 309 | ||
310 | /* FIXME: get symbolrate & frequency offset...*/ | 310 | /* FIXME: get symbolrate & frequency offset...*/ |
311 | /*p->frequency = ???;*/ | 311 | /*p->frequency = ???;*/ |
@@ -319,7 +319,7 @@ static int tda8083_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par | |||
319 | 319 | ||
320 | static int tda8083_sleep(struct dvb_frontend* fe) | 320 | static int tda8083_sleep(struct dvb_frontend* fe) |
321 | { | 321 | { |
322 | struct tda8083_state* state = (struct tda8083_state*) fe->demodulator_priv; | 322 | struct tda8083_state* state = fe->demodulator_priv; |
323 | 323 | ||
324 | tda8083_writereg (state, 0x00, 0x02); | 324 | tda8083_writereg (state, 0x00, 0x02); |
325 | return 0; | 325 | return 0; |
@@ -327,7 +327,7 @@ static int tda8083_sleep(struct dvb_frontend* fe) | |||
327 | 327 | ||
328 | static int tda8083_init(struct dvb_frontend* fe) | 328 | static int tda8083_init(struct dvb_frontend* fe) |
329 | { | 329 | { |
330 | struct tda8083_state* state = (struct tda8083_state*) fe->demodulator_priv; | 330 | struct tda8083_state* state = fe->demodulator_priv; |
331 | int i; | 331 | int i; |
332 | 332 | ||
333 | for (i=0; i<44; i++) | 333 | for (i=0; i<44; i++) |
@@ -343,7 +343,7 @@ static int tda8083_init(struct dvb_frontend* fe) | |||
343 | 343 | ||
344 | static int tda8083_diseqc_send_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t burst) | 344 | static int tda8083_diseqc_send_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t burst) |
345 | { | 345 | { |
346 | struct tda8083_state* state = (struct tda8083_state*) fe->demodulator_priv; | 346 | struct tda8083_state* state = fe->demodulator_priv; |
347 | 347 | ||
348 | tda8083_send_diseqc_burst (state, burst); | 348 | tda8083_send_diseqc_burst (state, burst); |
349 | tda8083_writereg (state, 0x00, 0x3c); | 349 | tda8083_writereg (state, 0x00, 0x3c); |
@@ -354,7 +354,7 @@ static int tda8083_diseqc_send_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t | |||
354 | 354 | ||
355 | static int tda8083_diseqc_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone) | 355 | static int tda8083_diseqc_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone) |
356 | { | 356 | { |
357 | struct tda8083_state* state = (struct tda8083_state*) fe->demodulator_priv; | 357 | struct tda8083_state* state = fe->demodulator_priv; |
358 | 358 | ||
359 | tda8083_set_tone (state, tone); | 359 | tda8083_set_tone (state, tone); |
360 | tda8083_writereg (state, 0x00, 0x3c); | 360 | tda8083_writereg (state, 0x00, 0x3c); |
@@ -365,7 +365,7 @@ static int tda8083_diseqc_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t t | |||
365 | 365 | ||
366 | static int tda8083_diseqc_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) | 366 | static int tda8083_diseqc_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) |
367 | { | 367 | { |
368 | struct tda8083_state* state = (struct tda8083_state*) fe->demodulator_priv; | 368 | struct tda8083_state* state = fe->demodulator_priv; |
369 | 369 | ||
370 | tda8083_set_voltage (state, voltage); | 370 | tda8083_set_voltage (state, voltage); |
371 | tda8083_writereg (state, 0x00, 0x3c); | 371 | tda8083_writereg (state, 0x00, 0x3c); |
@@ -376,7 +376,7 @@ static int tda8083_diseqc_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t | |||
376 | 376 | ||
377 | static void tda8083_release(struct dvb_frontend* fe) | 377 | static void tda8083_release(struct dvb_frontend* fe) |
378 | { | 378 | { |
379 | struct tda8083_state* state = (struct tda8083_state*) fe->demodulator_priv; | 379 | struct tda8083_state* state = fe->demodulator_priv; |
380 | kfree(state); | 380 | kfree(state); |
381 | } | 381 | } |
382 | 382 | ||
@@ -388,7 +388,7 @@ struct dvb_frontend* tda8083_attach(const struct tda8083_config* config, | |||
388 | struct tda8083_state* state = NULL; | 388 | struct tda8083_state* state = NULL; |
389 | 389 | ||
390 | /* allocate memory for the internal state */ | 390 | /* allocate memory for the internal state */ |
391 | state = (struct tda8083_state*) kmalloc(sizeof(struct tda8083_state), GFP_KERNEL); | 391 | state = kmalloc(sizeof(struct tda8083_state), GFP_KERNEL); |
392 | if (state == NULL) goto error; | 392 | if (state == NULL) goto error; |
393 | 393 | ||
394 | /* setup the state */ | 394 | /* setup the state */ |