summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-08-08 15:48:10 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 11:53:46 -0300
commitb7571f8d7e12cd70048331e6a0199a42dc995d99 (patch)
tree5a536abb2530f3bec89666ddebc457b35a1aba37 /drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
parent74340b0a8bc60b400c7e5fe4950303aa6f914d16 (diff)
V4L/DVB: Complete rewrite of the DiB3000mc-driver
A complete rewrite of the DiB3000MC/P driver has been done. It is now much more easy to maintain and to get improvements inside. Additionally the tuning time has been reduced and the usage of the driver is much more understandable now. Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr> Signed-off-by: Francois KANOUNNIKOFF <fkanounnikoff@dibcom.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb-dvb.c')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-dvb.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
index 9f8d3f0ca5a..71a754e2287 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
@@ -179,16 +179,15 @@ int dvb_usb_fe_init(struct dvb_usb_device* d)
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;
if (dvb_register_frontend(&d->dvb_adap, d->fe)) {
err("Frontend registration failed.");
- dvb_frontend_detach(d->fe);
+ if (d->fe->ops.release)
+ d->fe->ops.release(d->fe);
d->fe = NULL;
return -ENODEV;
}
@@ -203,9 +202,7 @@ int dvb_usb_fe_init(struct dvb_usb_device* d)
int dvb_usb_fe_exit(struct dvb_usb_device *d)
{
- if (d->fe != NULL) {
+ if (d->fe != NULL)
dvb_unregister_frontend(d->fe);
- dvb_frontend_detach(d->fe);
- }
return 0;
}