diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dibusb-common.c | 20 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-dvb.c | 7 |
2 files changed, 16 insertions, 11 deletions
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c index 390ced9ae4b..6723c153e3f 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/drivers/media/dvb/dvb-usb/dibusb-common.c | |||
@@ -230,15 +230,19 @@ static struct dib3000mc_config mod3000p_dib3000p_config = { | |||
230 | 230 | ||
231 | int dibusb_dib3000mc_frontend_attach(struct dvb_usb_device *d) | 231 | int dibusb_dib3000mc_frontend_attach(struct dvb_usb_device *d) |
232 | { | 232 | { |
233 | if (dib3000mc_attach(&d->i2c_adap, 1, DEFAULT_DIB3000P_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &d->fe) == 0) { | 233 | int ret; |
234 | if (d->priv != NULL) { | 234 | if ((ret = dib3000mc_attach(&d->i2c_adap, 1, DEFAULT_DIB3000P_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &d->fe)) != 0) |
235 | struct dibusb_state *st = d->priv; | 235 | return ret; |
236 | st->ops.pid_parse = dib3000mc_pid_parse; | 236 | |
237 | st->ops.pid_ctrl = dib3000mc_pid_control; | 237 | if ((ret = dib3000mc_attach(&d->i2c_adap, 1, DEFAULT_DIB3000MC_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &d->fe)) != 0) |
238 | } | 238 | return ret; |
239 | return 0; | 239 | |
240 | if (d->priv != NULL) { | ||
241 | struct dibusb_state *st = d->priv; | ||
242 | st->ops.pid_parse = dib3000mc_pid_parse; | ||
243 | st->ops.pid_ctrl = dib3000mc_pid_control; | ||
240 | } | 244 | } |
241 | return -ENODEV; | 245 | return 0; |
242 | } | 246 | } |
243 | EXPORT_SYMBOL(dibusb_dib3000mc_frontend_attach); | 247 | EXPORT_SYMBOL(dibusb_dib3000mc_frontend_attach); |
244 | 248 | ||
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c index 71a754e2287..3a19689d9c9 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c | |||
@@ -191,12 +191,13 @@ int dvb_usb_fe_init(struct dvb_usb_device* d) | |||
191 | d->fe = NULL; | 191 | d->fe = NULL; |
192 | return -ENODEV; | 192 | return -ENODEV; |
193 | } | 193 | } |
194 | |||
195 | /* only attach the tuner if the demod is there */ | ||
196 | if (d->props.tuner_attach != NULL) | ||
197 | d->props.tuner_attach(d); | ||
194 | } else | 198 | } else |
195 | err("no frontend was attached by '%s'",d->desc->name); | 199 | err("no frontend was attached by '%s'",d->desc->name); |
196 | 200 | ||
197 | if (d->props.tuner_attach != NULL) | ||
198 | d->props.tuner_attach(d); | ||
199 | |||
200 | return 0; | 201 | return 0; |
201 | } | 202 | } |
202 | 203 | ||