summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-08-03 11:31:23 +0200
committerPatrick Boettcher <pb@linuxtv.org>2006-08-03 11:31:23 +0200
commit32a2a5ff57851ba042dcd2352c7ec0aa96d242bf (patch)
treefc91c7ed9eb2d4c153cd692035ea36014fd257dc /linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
parent5d240a7d7f05be93610bae704a8bb4415907d247 (diff)
parente387412c0ad4e033e240cdaf43dd4fc4c16e1245 (diff)
downloadmediapointer-dvb-s2-32a2a5ff57851ba042dcd2352c7ec0aa96d242bf.tar.gz
mediapointer-dvb-s2-32a2a5ff57851ba042dcd2352c7ec0aa96d242bf.tar.bz2
merge from main
From: Patrick Boettcher <pb@linuxtv.org> merge from main Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c')
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
index 9f8d3f0ca..fe6208ada 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
@@ -175,14 +175,12 @@ static int dvb_usb_fe_sleep(struct dvb_frontend *fe)
int dvb_usb_fe_init(struct dvb_usb_device* d)
{
if (d->props.frontend_attach == NULL) {
- err("strange '%s' doesn't want to attach a frontend.",d->desc->name);
+ err("strange: '%s' doesn't want to attach a frontend.",d->desc->name);
return 0;
}
- d->props.frontend_attach(d);
-
/* re-assign sleep and wakeup functions */
- if (d->fe != NULL) {
+ if (d->props.frontend_attach(d) == 0 && d->fe != NULL) {
d->fe_init = d->fe->ops.init; d->fe->ops.init = dvb_usb_fe_wakeup;
d->fe_sleep = d->fe->ops.sleep; d->fe->ops.sleep = dvb_usb_fe_sleep;
@@ -192,12 +190,13 @@ int dvb_usb_fe_init(struct dvb_usb_device* d)
d->fe = NULL;
return -ENODEV;
}
+
+ /* only attach the tuner if the demod is there */
+ if (d->props.tuner_attach != NULL)
+ d->props.tuner_attach(d);
} else
err("no frontend was attached by '%s'",d->desc->name);
- if (d->props.tuner_attach != NULL)
- d->props.tuner_attach(d);
-
return 0;
}