diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-21 09:35:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-04 19:20:27 -0500 |
commit | fad11dbc936cfd8483235f955b54636447a4425d (patch) | |
tree | c47489939249b179a5e3050ea89b05c9db867ac8 /drivers/media/common | |
parent | 31e67faeaf058e0575cfb304a39dbcccf3d8569b (diff) |
[media] mt2063: Simplify mt2063_setTune logic
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/tuners/mt2063.c | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/drivers/media/common/tuners/mt2063.c b/drivers/media/common/tuners/mt2063.c index 3c0b3f1ec248..53e3960eb7c0 100644 --- a/drivers/media/common/tuners/mt2063.c +++ b/drivers/media/common/tuners/mt2063.c | |||
@@ -323,34 +323,6 @@ static u32 MT2063_ClearPowerMaskBits(struct mt2063_state *state, enum MT2063_Mas | |||
323 | /*****************/ | 323 | /*****************/ |
324 | /* From drivers/media/common/tuners/mt2063_cfg.h */ | 324 | /* From drivers/media/common/tuners/mt2063_cfg.h */ |
325 | 325 | ||
326 | unsigned int mt2063_setTune(struct dvb_frontend *fe, u32 f_in, | ||
327 | u32 bw_in, | ||
328 | enum MTTune_atv_standard tv_type) | ||
329 | { | ||
330 | struct dvb_frontend_ops *frontend_ops = NULL; | ||
331 | struct dvb_tuner_ops *tuner_ops = NULL; | ||
332 | struct tuner_state t_state; | ||
333 | struct mt2063_state *state = fe->tuner_priv; | ||
334 | int err = 0; | ||
335 | |||
336 | t_state.frequency = f_in; | ||
337 | t_state.bandwidth = bw_in; | ||
338 | state->tv_type = tv_type; | ||
339 | if (&fe->ops) | ||
340 | frontend_ops = &fe->ops; | ||
341 | if (&frontend_ops->tuner_ops) | ||
342 | tuner_ops = &frontend_ops->tuner_ops; | ||
343 | if (tuner_ops->set_state) { | ||
344 | if ((err = | ||
345 | tuner_ops->set_state(fe, DVBFE_TUNER_FREQUENCY, | ||
346 | &t_state)) < 0) { | ||
347 | printk("%s: Invalid parameter\n", __func__); | ||
348 | return err; | ||
349 | } | ||
350 | } | ||
351 | |||
352 | return err; | ||
353 | } | ||
354 | 326 | ||
355 | unsigned int tuner_MT2063_SoftwareShutdown(struct dvb_frontend *fe) | 327 | unsigned int tuner_MT2063_SoftwareShutdown(struct dvb_frontend *fe) |
356 | { | 328 | { |
@@ -2862,19 +2834,16 @@ static u32 MT2063_Tune(struct mt2063_state *state, u32 f_in) | |||
2862 | return status; | 2834 | return status; |
2863 | } | 2835 | } |
2864 | 2836 | ||
2865 | static u32 MT_Tune_atv(void *h, u32 f_in, u32 bw_in, | 2837 | unsigned int mt2063_setTune(void *h, u32 f_in, u32 bw_in, |
2866 | enum MTTune_atv_standard tv_type) | 2838 | enum MTTune_atv_standard tv_type) |
2867 | { | 2839 | { |
2868 | |||
2869 | u32 status = 0; | 2840 | u32 status = 0; |
2870 | |||
2871 | s32 pict_car = 0; | 2841 | s32 pict_car = 0; |
2872 | s32 pict2chanb_vsb = 0; | 2842 | s32 pict2chanb_vsb = 0; |
2873 | s32 pict2chanb_snd = 0; | 2843 | s32 pict2chanb_snd = 0; |
2874 | s32 pict2snd1 = 0; | 2844 | s32 pict2snd1 = 0; |
2875 | s32 pict2snd2 = 0; | 2845 | s32 pict2snd2 = 0; |
2876 | s32 ch_bw = 0; | 2846 | s32 ch_bw = 0; |
2877 | |||
2878 | s32 if_mid = 0; | 2847 | s32 if_mid = 0; |
2879 | s32 rcvr_mode = 0; | 2848 | s32 rcvr_mode = 0; |
2880 | u32 mode_get = 0; | 2849 | u32 mode_get = 0; |
@@ -3290,7 +3259,7 @@ static int mt2063_set_state(struct dvb_frontend *fe, | |||
3290 | //set frequency | 3259 | //set frequency |
3291 | 3260 | ||
3292 | status = | 3261 | status = |
3293 | MT_Tune_atv(state, | 3262 | mt2063_setTune(state, |
3294 | tunstate->frequency, tunstate->bandwidth, | 3263 | tunstate->frequency, tunstate->bandwidth, |
3295 | state->tv_type); | 3264 | state->tv_type); |
3296 | 3265 | ||