Skip to content

Commit d3bcaf0

Browse files
Hans VerkuilMauro Carvalho Chehab
authored andcommitted
[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>
1 parent 2122eaf commit d3bcaf0

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

‎drivers/media/common/tuners/mxl5005s.c‎

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum,
309309
static u16 MXL_SetGPIO(struct dvb_frontend *fe, u8 GPIO_Num, u8 GPIO_Val);
310310
static u16 MXL_GetInitRegister(struct dvb_frontend *fe, u8 *RegNum,
311311
u8 *RegVal, int *count);
312-
static u32 MXL_GetXtalInt(u32 Xtal_Freq);
313312
static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq);
314313
static void MXL_SynthIFLO_Calc(struct dvb_frontend *fe);
315314
static void MXL_SynthRFTGLO_Calc(struct dvb_frontend *fe);
@@ -2307,14 +2306,6 @@ static u16 MXL_IFSynthInit(struct dvb_frontend *fe)
23072306
return status ;
23082307
}
23092308

2310-
static 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-
23182309
static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq)
23192310
{
23202311
struct mxl5005s_state *state = fe->tuner_priv;
@@ -2324,13 +2315,10 @@ static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq)
23242315
u32 Kdbl_RF = 2;
23252316
u32 tg_divval;
23262317
u32 tg_lo;
2327-
u32 Xtal_Int;
23282318

23292319
u32 Fref_TG;
23302320
u32 Fvco;
23312321

2332-
Xtal_Int = MXL_GetXtalInt(state->Fxtal);
2333-
23342322
state->RF_IN = RF_Freq;
23352323

23362324
MXL_SynthRFTGLO_Calc(fe);
@@ -2779,6 +2767,16 @@ static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq)
27792767
tg_lo = (((Fmax/10 - Fvco)/100)*32) / ((Fmax-Fmin)/1000)+8;
27802768

27812769
/* 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);
27822780
* tg_lo = ( ((Fmax/10000 * Xtal_Int)/100) -
27832781
* ((state->TG_LO/10000)*divider_val *
27842782
* (state->Fxtal/10000)/100) )*32/((Fmax-Fmin)/10000 *

0 commit comments

Comments
 (0)