File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
drivers/media/dvb-frontends Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,7 @@ static int tda10048_set_if(struct dvb_frontend *fe, u32 bw)
410
410
struct tda10048_config * config = & state -> config ;
411
411
int i ;
412
412
u32 if_freq_khz ;
413
+ u64 sample_freq ;
413
414
414
415
dprintk (1 , "%s(bw = %d)\n" , __func__ , bw );
415
416
@@ -451,9 +452,11 @@ static int tda10048_set_if(struct dvb_frontend *fe, u32 bw)
451
452
dprintk (1 , "- pll_pfactor = %d\n" , state -> pll_pfactor );
452
453
453
454
/* Calculate the sample frequency */
454
- state -> sample_freq = state -> xtal_hz * (state -> pll_mfactor + 45 );
455
- state -> sample_freq /= (state -> pll_nfactor + 1 );
456
- state -> sample_freq /= (state -> pll_pfactor + 4 );
455
+ sample_freq = state -> xtal_hz ;
456
+ sample_freq *= state -> pll_mfactor + 45 ;
457
+ do_div (sample_freq , state -> pll_nfactor + 1 );
458
+ do_div (sample_freq , state -> pll_pfactor + 4 );
459
+ state -> sample_freq = sample_freq ;
457
460
dprintk (1 , "- sample_freq = %d\n" , state -> sample_freq );
458
461
459
462
/* Update the I/F */
You can’t perform that action at this time.
0 commit comments