]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/pvrusb2/pvrusb2-main.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
[linux-2.6-omap-h63xx.git] / drivers / media / video / pvrusb2 / pvrusb2-main.c
index b63b2265503ac174a335e1ca23c5a560e8d1c31c..ad0d98c2ebb4165ab34ef638f7786bd89463a30e 100644 (file)
@@ -1,6 +1,5 @@
 /*
  *
- *  $Id$
  *
  *  Copyright (C) 2005 Mike Isely <isely@pobox.com>
  *  Copyright (C) 2004 Aurelien Alleaume <slts@free.fr>
@@ -60,6 +59,10 @@ static void pvr_setup_attach(struct pvr2_context *pvr)
 {
        /* Create association with v4l layer */
        pvr2_v4l2_create(pvr);
+#ifdef CONFIG_VIDEO_PVRUSB2_DVB
+       /* Create association with dvb layer */
+       pvr2_dvb_create(pvr);
+#endif
 #ifdef CONFIG_VIDEO_PVRUSB2_SYSFS
        pvr2_sysfs_create(pvr,class_ptr);
 #endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */
@@ -121,6 +124,12 @@ static int __init pvr_init(void)
 
        pvr2_trace(PVR2_TRACE_INIT,"pvr_init");
 
+       ret = pvr2_context_global_init();
+       if (ret != 0) {
+               pvr2_trace(PVR2_TRACE_INIT,"pvr_init failure code=%d",ret);
+               return ret;
+       }
+
 #ifdef CONFIG_VIDEO_PVRUSB2_SYSFS
        class_ptr = pvr2_sysfs_class_create();
 #endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */
@@ -132,6 +141,8 @@ static int __init pvr_init(void)
        if (pvrusb2_debug) info("Debug mask is %d (0x%x)",
                                pvrusb2_debug,pvrusb2_debug);
 
+       pvr2_trace(PVR2_TRACE_INIT,"pvr_init complete");
+
        return ret;
 }
 
@@ -144,6 +155,10 @@ static void __exit pvr_exit(void)
 #ifdef CONFIG_VIDEO_PVRUSB2_SYSFS
        pvr2_sysfs_class_destroy(class_ptr);
 #endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */
+
+       pvr2_context_global_done();
+
+       pvr2_trace(PVR2_TRACE_INIT,"pvr_exit complete");
 }
 
 module_init(pvr_init);