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

media: dib8000: remove some bogus dead code

This function is broken. It sets the wrong front_end to NULL. But it's
not used, so let's just delete it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Dan Carpenter and committed by
Mauro Carvalho Chehab
47bdf7c6 5af47834

-19
-18
drivers/media/dvb-frontends/dib8000.c
··· 4255 4255 return -ENOMEM; 4256 4256 } 4257 4257 4258 - static int dib8000_remove_slave_frontend(struct dvb_frontend *fe) 4259 - { 4260 - struct dib8000_state *state = fe->demodulator_priv; 4261 - u8 index_frontend = 1; 4262 - 4263 - while ((index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL)) 4264 - index_frontend++; 4265 - if (index_frontend != 1) { 4266 - dprintk("remove slave fe %p (index %i)\n", state->fe[index_frontend-1], index_frontend-1); 4267 - state->fe[index_frontend] = NULL; 4268 - return 0; 4269 - } 4270 - 4271 - dprintk("no frontend to be removed\n"); 4272 - return -ENODEV; 4273 - } 4274 - 4275 4258 static struct dvb_frontend *dib8000_get_slave_frontend(struct dvb_frontend *fe, int slave_index) 4276 4259 { 4277 4260 struct dib8000_state *state = fe->demodulator_priv; ··· 4489 4506 ops->get_slave_frontend = dib8000_get_slave_frontend; 4490 4507 ops->set_tune_state = dib8000_set_tune_state; 4491 4508 ops->pid_filter_ctrl = dib8000_pid_filter_ctrl; 4492 - ops->remove_slave_frontend = dib8000_remove_slave_frontend; 4493 4509 ops->get_adc_power = dib8000_get_adc_power; 4494 4510 ops->update_pll = dib8000_update_pll; 4495 4511 ops->tuner_sleep = dib8096p_tuner_sleep;
-1
drivers/media/dvb-frontends/dib8000.h
··· 53 53 enum frontend_tune_state (*get_tune_state)(struct dvb_frontend *fe); 54 54 int (*set_tune_state)(struct dvb_frontend *fe, enum frontend_tune_state tune_state); 55 55 int (*set_slave_frontend)(struct dvb_frontend *fe, struct dvb_frontend *fe_slave); 56 - int (*remove_slave_frontend)(struct dvb_frontend *fe); 57 56 struct dvb_frontend *(*get_slave_frontend)(struct dvb_frontend *fe, int slave_index); 58 57 int (*i2c_enumeration)(struct i2c_adapter *host, int no_of_demods, 59 58 u8 default_addr, u8 first_addr, u8 is_dib8096p);