summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2012-06-14 09:44:47 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-04 14:56:32 +0400
commit2cc53dc82868c8d425825dbfe6d6fbf6a972486d (patch)
treecd61c4c22a66d4f9e727c492ef4a816b59655e09 /drivers/media/dvb/dvb-usb
parentec04745790f47f23f558f07398fe69e963744f11 (diff)
downloadlinux-2cc53dc82868c8d425825dbfe6d6fbf6a972486d.tar.xz
[media] dvb_usb_v2: attach tuners later
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>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb_usb_dvb.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c b/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c
index f302e63a0d8f..6149236e4ef8 100644
--- a/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c
+++ b/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c
@@ -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;
@@ -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;