Commit 2168b49a authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Tomi Valkeinen

drivers/video/fbdev/i740fb: remove unused variable

The value of d_best is always 0 and never changes.
Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 9f9499ae
...@@ -346,11 +346,10 @@ static void i740_calc_vclk(u32 freq, struct i740fb_par *par) ...@@ -346,11 +346,10 @@ static void i740_calc_vclk(u32 freq, struct i740fb_par *par)
const u32 err_target = freq / (1000 * I740_RFREQ / I740_FFIX); const u32 err_target = freq / (1000 * I740_RFREQ / I740_FFIX);
u32 err_best = 512 * I740_FFIX; u32 err_best = 512 * I740_FFIX;
u32 f_err, f_vco; u32 f_err, f_vco;
int m_best = 0, n_best = 0, p_best = 0, d_best = 0; int m_best = 0, n_best = 0, p_best = 0;
int m, n; int m, n;
p_best = min(15, ilog2(I740_MAX_VCO_FREQ / (freq / I740_RFREQ_FIX))); p_best = min(15, ilog2(I740_MAX_VCO_FREQ / (freq / I740_RFREQ_FIX)));
d_best = 0;
f_vco = (freq * (1 << p_best)) / I740_RFREQ_FIX; f_vco = (freq * (1 << p_best)) / I740_RFREQ_FIX;
freq = freq / I740_RFREQ_FIX; freq = freq / I740_RFREQ_FIX;
...@@ -363,7 +362,7 @@ static void i740_calc_vclk(u32 freq, struct i740fb_par *par) ...@@ -363,7 +362,7 @@ static void i740_calc_vclk(u32 freq, struct i740fb_par *par)
m = 3; m = 3;
{ {
u32 f_out = (((m * I740_REF_FREQ * (4 << 2 * d_best)) u32 f_out = (((m * I740_REF_FREQ * 4)
/ n) + ((1 << p_best) / 2)) / (1 << p_best); / n) + ((1 << p_best) / 2)) / (1 << p_best);
f_err = (freq - f_out); f_err = (freq - f_out);
...@@ -386,8 +385,7 @@ static void i740_calc_vclk(u32 freq, struct i740fb_par *par) ...@@ -386,8 +385,7 @@ static void i740_calc_vclk(u32 freq, struct i740fb_par *par)
par->video_clk2_n = (n_best - 2) & 0xFF; par->video_clk2_n = (n_best - 2) & 0xFF;
par->video_clk2_mn_msbs = ((((n_best - 2) >> 4) & VCO_N_MSBS) par->video_clk2_mn_msbs = ((((n_best - 2) >> 4) & VCO_N_MSBS)
| (((m_best - 2) >> 8) & VCO_M_MSBS)); | (((m_best - 2) >> 8) & VCO_M_MSBS));
par->video_clk2_div_sel = par->video_clk2_div_sel = ((p_best << 4) | REF_DIV_1);
((p_best << 4) | (d_best ? 4 : 0) | REF_DIV_1);
} }
static int i740fb_decode_var(const struct fb_var_screeninfo *var, static int i740fb_decode_var(const struct fb_var_screeninfo *var,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment