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

media: stv6110: get rid of a srate dead code

The stv6110 has a weird code that checks if get_property
and set_property ioctls are defined. If they're, it initializes
a "srate" var from properties cache. Otherwise, it sets to
15MBaud, with won't make any sense.

Thankfully, it seems that someone else discovered the issue in
the past, as "srate" is currently not used anywhere!

So, get rid of that really weird dead code logic.

Reported-by: Honza Petrous <jpetrous@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

-9
-9
drivers/media/dvb-frontends/stv6110.c
··· 258 258 static int stv6110_set_frequency(struct dvb_frontend *fe, u32 frequency) 259 259 { 260 260 struct stv6110_priv *priv = fe->tuner_priv; 261 - struct dtv_frontend_properties *c = &fe->dtv_property_cache; 262 261 u8 ret = 0x04; 263 262 u32 divider, ref, p, presc, i, result_freq, vco_freq; 264 263 s32 p_calc, p_calc_opt = 1000, r_div, r_div_opt = 0, p_val; 265 - s32 srate; 266 264 267 265 dprintk("%s, freq=%d kHz, mclk=%d Hz\n", __func__, 268 266 frequency, priv->mclk); ··· 271 273 ((((priv->mclk / 1000000) - 16) & 0x1f) << 3); 272 274 273 275 /* BB_GAIN = db/2 */ 274 - if (fe->ops.set_property && fe->ops.get_property) { 275 - srate = c->symbol_rate; 276 - dprintk("%s: Get Frontend parameters: srate=%d\n", 277 - __func__, srate); 278 - } else 279 - srate = 15000000; 280 - 281 276 priv->regs[RSTV6110_CTRL2] &= ~0x0f; 282 277 priv->regs[RSTV6110_CTRL2] |= (priv->gain & 0x0f); 283 278