diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-08-06 10:33:45 +0200 |
---|---|---|
committer | Patrick Boettcher <pb@linuxtv.org> | 2006-08-06 10:33:45 +0200 |
commit | 5b742a05b517e61d7fa3ade7f1adbf8a4d16f04d (patch) | |
tree | 9ca5f26b5dfc516dfae52e57ecf99628dc643e88 /linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c | |
parent | 660c810f401a2a54ed59ddfcb2b3c75228a8ca57 (diff) | |
parent | 39fd6c4e2f9d26ccf2ecdd0a09863779eb68e1fe (diff) | |
download | mediapointer-dvb-s2-5b742a05b517e61d7fa3ade7f1adbf8a4d16f04d.tar.gz mediapointer-dvb-s2-5b742a05b517e61d7fa3ade7f1adbf8a4d16f04d.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.c | 13 |
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; } |