Skip to content

Commit

Permalink
[media] dvb_usb_v2: attach tuners later
Browse files Browse the repository at this point in the history
It is more than nice to have all those frontend pointers when
attaching tuner to the frontend in question. Make that possible
attaching tuners after dvb_register_frontend()

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Aug 4, 2012
1 parent ec04745 commit 2cc53dc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions drivers/media/dvb/dvb-usb/dvb_usb_dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,15 +359,6 @@ int dvb_usbv2_adapter_frontend_init(struct dvb_usb_adapter *adap)
goto err;
}

if (adap->dev->props->tuner_attach) {
ret = adap->dev->props->tuner_attach(adap);
if (ret < 0) {
pr_debug("%s: tuner_attach() failed=%d\n", __func__,
ret);
goto err_dvb_frontend_detach;
}
}

for (i = 0; i < MAX_NO_OF_FE_PER_ADAP && adap->fe[i]; i++) {
adap->fe[i]->id = i;

Expand All @@ -387,6 +378,15 @@ int dvb_usbv2_adapter_frontend_init(struct dvb_usb_adapter *adap)
count_registered++;
}

if (adap->dev->props->tuner_attach) {
ret = adap->dev->props->tuner_attach(adap);
if (ret < 0) {
pr_debug("%s: tuner_attach() failed=%d\n", __func__,
ret);
goto err_dvb_unregister_frontend;
}
}

adap->num_frontends_initialized = count_registered;

return 0;
Expand Down

0 comments on commit 2cc53dc

Please sign in to comment.