The patch number 9577 was added via Mauro Carvalho Chehab <[EMAIL PROTECTED]> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel If anyone has any objections, please let us know by sending a message to: [EMAIL PROTECTED] ------ From: Darron Broad <[EMAIL PROTECTED]> saa7134-dvb: MFE attachment clean-up for saa-7134 dvb This cleans-up MFE attachment for saa-7134 dvb devices. note: MFE is not fully implemented here yet. Priority: normal Signed-off-by: Darron Broad <[EMAIL PROTECTED]> Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]> --- linux/drivers/media/video/saa7134/saa7134-dvb.c | 24 ++++------------ 1 file changed, 7 insertions(+), 17 deletions(-) diff -r da255cb92047 -r 598777dd0e80 linux/drivers/media/video/saa7134/saa7134-dvb.c --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c Tue Nov 11 09:48:27 2008 -0200 +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c Tue Nov 11 09:50:02 2008 -0200 @@ -954,19 +954,13 @@ static int dvb_init(struct saa7134_dev * /* FIXME: add support for multi-frontend */ mutex_init(&dev->frontends.lock); INIT_LIST_HEAD(&dev->frontends.felist); - dev->frontends.active_fe_id = 0; printk(KERN_INFO "%s() allocating 1 frontend\n", __func__); - - if (videobuf_dvb_alloc_frontend(&dev->frontends, 1) == NULL) { + fe0 = videobuf_dvb_alloc_frontend(&dev->frontends, 1); + if (!fe0) { printk(KERN_ERR "%s() failed to alloc\n", __func__); return -ENOMEM; } - - /* Get the first frontend */ - fe0 = videobuf_dvb_get_frontend(&dev->frontends, 1); - if (!fe0) - return -EINVAL; /* init struct videobuf_dvb */ dev->ts.nr_bufs = 32; @@ -1380,7 +1374,7 @@ static int dvb_init(struct saa7134_dev * }; if (!fe0->dvb.frontend) - return -1; + goto dettach_frontend; fe = dvb_attach(xc2028_attach, fe0->dvb.frontend, &cfg); if (!fe) { @@ -1392,7 +1386,7 @@ static int dvb_init(struct saa7134_dev * if (NULL == fe0->dvb.frontend) { printk(KERN_ERR "%s/dvb: frontend initialization failed\n", dev->name); - return -1; + goto dettach_frontend; } /* define general-purpose callback pointer */ fe0->dvb.frontend->callback = saa7134_tuner_callback; @@ -1415,11 +1409,8 @@ static int dvb_init(struct saa7134_dev * return ret; dettach_frontend: - if (fe0->dvb.frontend) - dvb_frontend_detach(fe0->dvb.frontend); - fe0->dvb.frontend = NULL; - - return -1; + videobuf_dvb_dealloc_frontends(&dev->frontends); + return -EINVAL; } static int dvb_fini(struct saa7134_dev *dev) @@ -1458,8 +1449,7 @@ static int dvb_fini(struct saa7134_dev * } } } - if (fe0->dvb.frontend) - videobuf_dvb_unregister_bus(&dev->frontends); + videobuf_dvb_unregister_bus(&dev->frontends); return 0; } --- Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/598777dd0e806b3dd5f2407b69929dd6c4a0abe8 _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits