aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2011-08-25 09:10:32 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-06 13:43:43 -0400
commitd3bcaf083bb7a081b280a04898f7c9f68e1253d4 (patch)
tree311e70bcb44caaa4426236bce0953cba0e25db59 /drivers/media/common
parent2122eaf64acd9ca42645b4bf8f222c7d452313f1 (diff)
[media] mxl5005s: fix compiler warning
Removed the unused Xtal_Int variable. That made it also possible to remove a related function. However, the code of that function has been preserved in a comment describing an equation. Without that function that comment would have been hard to understand. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/tuners/mxl5005s.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/media/common/tuners/mxl5005s.c b/drivers/media/common/tuners/mxl5005s.c
index 56fe75c94deb..54be9e6faaaf 100644
--- a/drivers/media/common/tuners/mxl5005s.c
+++ b/drivers/media/common/tuners/mxl5005s.c
@@ -309,7 +309,6 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum,
309static u16 MXL_SetGPIO(struct dvb_frontend *fe, u8 GPIO_Num, u8 GPIO_Val); 309static u16 MXL_SetGPIO(struct dvb_frontend *fe, u8 GPIO_Num, u8 GPIO_Val);
310static u16 MXL_GetInitRegister(struct dvb_frontend *fe, u8 *RegNum, 310static u16 MXL_GetInitRegister(struct dvb_frontend *fe, u8 *RegNum,
311 u8 *RegVal, int *count); 311 u8 *RegVal, int *count);
312static u32 MXL_GetXtalInt(u32 Xtal_Freq);
313static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq); 312static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq);
314static void MXL_SynthIFLO_Calc(struct dvb_frontend *fe); 313static void MXL_SynthIFLO_Calc(struct dvb_frontend *fe);
315static void MXL_SynthRFTGLO_Calc(struct dvb_frontend *fe); 314static void MXL_SynthRFTGLO_Calc(struct dvb_frontend *fe);
@@ -2307,14 +2306,6 @@ static u16 MXL_IFSynthInit(struct dvb_frontend *fe)
2307 return status ; 2306 return status ;
2308} 2307}
2309 2308
2310static u32 MXL_GetXtalInt(u32 Xtal_Freq)
2311{
2312 if ((Xtal_Freq % 1000000) == 0)
2313 return (Xtal_Freq / 10000);
2314 else
2315 return (((Xtal_Freq / 1000000) + 1)*100);
2316}
2317
2318static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq) 2309static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq)
2319{ 2310{
2320 struct mxl5005s_state *state = fe->tuner_priv; 2311 struct mxl5005s_state *state = fe->tuner_priv;
@@ -2324,13 +2315,10 @@ static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq)
2324 u32 Kdbl_RF = 2; 2315 u32 Kdbl_RF = 2;
2325 u32 tg_divval; 2316 u32 tg_divval;
2326 u32 tg_lo; 2317 u32 tg_lo;
2327 u32 Xtal_Int;
2328 2318
2329 u32 Fref_TG; 2319 u32 Fref_TG;
2330 u32 Fvco; 2320 u32 Fvco;
2331 2321
2332 Xtal_Int = MXL_GetXtalInt(state->Fxtal);
2333
2334 state->RF_IN = RF_Freq; 2322 state->RF_IN = RF_Freq;
2335 2323
2336 MXL_SynthRFTGLO_Calc(fe); 2324 MXL_SynthRFTGLO_Calc(fe);
@@ -2779,6 +2767,16 @@ static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq)
2779 tg_lo = (((Fmax/10 - Fvco)/100)*32) / ((Fmax-Fmin)/1000)+8; 2767 tg_lo = (((Fmax/10 - Fvco)/100)*32) / ((Fmax-Fmin)/1000)+8;
2780 2768
2781 /* below equation is same as above but much harder to debug. 2769 /* below equation is same as above but much harder to debug.
2770 *
2771 * static u32 MXL_GetXtalInt(u32 Xtal_Freq)
2772 * {
2773 * if ((Xtal_Freq % 1000000) == 0)
2774 * return (Xtal_Freq / 10000);
2775 * else
2776 * return (((Xtal_Freq / 1000000) + 1)*100);
2777 * }
2778 *
2779 * u32 Xtal_Int = MXL_GetXtalInt(state->Fxtal);
2782 * tg_lo = ( ((Fmax/10000 * Xtal_Int)/100) - 2780 * tg_lo = ( ((Fmax/10000 * Xtal_Int)/100) -
2783 * ((state->TG_LO/10000)*divider_val * 2781 * ((state->TG_LO/10000)*divider_val *
2784 * (state->Fxtal/10000)/100) )*32/((Fmax-Fmin)/10000 * 2782 * (state->Fxtal/10000)/100) )*32/((Fmax-Fmin)/10000 *