Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
d3bcaf08 2122eaf6

+10 -12
+10 -12
drivers/media/common/tuners/mxl5005s.c
··· 309 309 static u16 MXL_SetGPIO(struct dvb_frontend *fe, u8 GPIO_Num, u8 GPIO_Val); 310 310 static u16 MXL_GetInitRegister(struct dvb_frontend *fe, u8 *RegNum, 311 311 u8 *RegVal, int *count); 312 - static u32 MXL_GetXtalInt(u32 Xtal_Freq); 313 312 static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq); 314 313 static void MXL_SynthIFLO_Calc(struct dvb_frontend *fe); 315 314 static void MXL_SynthRFTGLO_Calc(struct dvb_frontend *fe); ··· 2306 2307 return status ; 2307 2308 } 2308 2309 2309 - static u32 MXL_GetXtalInt(u32 Xtal_Freq) 2310 - { 2311 - if ((Xtal_Freq % 1000000) == 0) 2312 - return (Xtal_Freq / 10000); 2313 - else 2314 - return (((Xtal_Freq / 1000000) + 1)*100); 2315 - } 2316 - 2317 2310 static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq) 2318 2311 { 2319 2312 struct mxl5005s_state *state = fe->tuner_priv; ··· 2315 2324 u32 Kdbl_RF = 2; 2316 2325 u32 tg_divval; 2317 2326 u32 tg_lo; 2318 - u32 Xtal_Int; 2319 2327 2320 2328 u32 Fref_TG; 2321 2329 u32 Fvco; 2322 - 2323 - Xtal_Int = MXL_GetXtalInt(state->Fxtal); 2324 2330 2325 2331 state->RF_IN = RF_Freq; 2326 2332 ··· 2767 2779 tg_lo = (((Fmax/10 - Fvco)/100)*32) / ((Fmax-Fmin)/1000)+8; 2768 2780 2769 2781 /* below equation is same as above but much harder to debug. 2782 + * 2783 + * static u32 MXL_GetXtalInt(u32 Xtal_Freq) 2784 + * { 2785 + * if ((Xtal_Freq % 1000000) == 0) 2786 + * return (Xtal_Freq / 10000); 2787 + * else 2788 + * return (((Xtal_Freq / 1000000) + 1)*100); 2789 + * } 2790 + * 2791 + * u32 Xtal_Int = MXL_GetXtalInt(state->Fxtal); 2770 2792 * tg_lo = ( ((Fmax/10000 * Xtal_Int)/100) - 2771 2793 * ((state->TG_LO/10000)*divider_val * 2772 2794 * (state->Fxtal/10000)/100) )*32/((Fmax-Fmin)/10000 *