diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf.c b/drivers/media/usb/dvb-usb-v2/mxl111sf.c index 6404eb74d..fc4010b6e 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf.c +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf.c @@ -431,8 +431,6 @@ static int mxl111sf_lgdt3305_frontend_attach(struct dvb_usb_adapter *adap, u8 fe pr_debug("%s()\n", __func__); - /* save a pointer to the dvb_usb_device in device state */ - state->d = d; adap_state->alt_mode = (dvb_usb_mxl111sf_isoc) ? 2 : 1; state->alt_mode = adap_state->alt_mode; @@ -502,8 +500,6 @@ static int mxl111sf_lg2160_frontend_attach(struct dvb_usb_adapter *adap, u8 fe_i pr_debug("%s()\n", __func__); - /* save a pointer to the dvb_usb_device in device state */ - state->d = d; adap_state->alt_mode = (dvb_usb_mxl111sf_isoc) ? 2 : 1; state->alt_mode = adap_state->alt_mode; @@ -587,8 +583,6 @@ static int mxl111sf_lg2161_frontend_attach(struct dvb_usb_adapter *adap, u8 fe_i pr_debug("%s()\n", __func__); - /* save a pointer to the dvb_usb_device in device state */ - state->d = d; adap_state->alt_mode = (dvb_usb_mxl111sf_isoc) ? 2 : 1; state->alt_mode = adap_state->alt_mode; @@ -674,8 +668,6 @@ static int mxl111sf_lg2161_ep6_frontend_attach(struct dvb_usb_adapter *adap, u8 pr_debug("%s()\n", __func__); - /* save a pointer to the dvb_usb_device in device state */ - state->d = d; adap_state->alt_mode = (dvb_usb_mxl111sf_isoc) ? 2 : 1; state->alt_mode = adap_state->alt_mode; @@ -749,8 +741,6 @@ static int mxl111sf_attach_demod(struct dvb_usb_adapter *adap, u8 fe_id) pr_debug("%s()\n", __func__); - /* save a pointer to the dvb_usb_device in device state */ - state->d = d; adap_state->alt_mode = (dvb_usb_mxl111sf_isoc) ? 1 : 2; state->alt_mode = adap_state->alt_mode; @@ -935,8 +925,6 @@ static int mxl111sf_init(struct dvb_usb_device *d) if (mxl_fail(ret)) pr_err("failed to get chip info during probe"); - mutex_init(&state->fe_lock); - if (state->chip_rev > MXL111SF_V6) mxl111sf_config_pin_mux_modes(state, PIN_MUX_TS_SPI_IN_MODE_1); @@ -1068,7 +1056,9 @@ static int mxl111sf_probe(struct dvb_usb_device *dev) { struct mxl111sf_state *state = d_to_priv(dev); + state->d = dev; mutex_init(&state->msg_lock); + mutex_init(&state->fe_lock); return 0; }