summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-08-06 07:21:57 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-08-06 07:21:57 -0300
commitabfdae7e6d6492977cb1784eda4a884c74541f2f (patch)
tree018e3bf5520b0334d7807c5f7d7b0c1c9b2bd5b8 /linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
parent4b7451caa9ce14c39b26eb7c953be5c037ebb40e (diff)
parent487a380f105dca61c562573ded6b5748894fcd27 (diff)
downloadmediapointer-dvb-s2-abfdae7e6d6492977cb1784eda4a884c74541f2f.tar.gz
mediapointer-dvb-s2-abfdae7e6d6492977cb1784eda4a884c74541f2f.tar.bz2
merge: http://linuxtv.org/hg/~pb/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.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;
}