aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-main.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-main.c b/drivers/media/video/pvrusb2/pvrusb2-main.c
index b63b2265503a..332aced8a5a1 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-main.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-main.c
@@ -60,6 +60,10 @@ static void pvr_setup_attach(struct pvr2_context *pvr)
60{ 60{
61 /* Create association with v4l layer */ 61 /* Create association with v4l layer */
62 pvr2_v4l2_create(pvr); 62 pvr2_v4l2_create(pvr);
63#ifdef CONFIG_VIDEO_PVRUSB2_DVB
64 /* Create association with dvb layer */
65 pvr2_dvb_create(pvr);
66#endif
63#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS 67#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS
64 pvr2_sysfs_create(pvr,class_ptr); 68 pvr2_sysfs_create(pvr,class_ptr);
65#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ 69#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */
@@ -121,6 +125,12 @@ static int __init pvr_init(void)
121 125
122 pvr2_trace(PVR2_TRACE_INIT,"pvr_init"); 126 pvr2_trace(PVR2_TRACE_INIT,"pvr_init");
123 127
128 ret = pvr2_context_global_init();
129 if (ret != 0) {
130 pvr2_trace(PVR2_TRACE_INIT,"pvr_init failure code=%d",ret);
131 return ret;
132 }
133
124#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS 134#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS
125 class_ptr = pvr2_sysfs_class_create(); 135 class_ptr = pvr2_sysfs_class_create();
126#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ 136#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */
@@ -132,6 +142,8 @@ static int __init pvr_init(void)
132 if (pvrusb2_debug) info("Debug mask is %d (0x%x)", 142 if (pvrusb2_debug) info("Debug mask is %d (0x%x)",
133 pvrusb2_debug,pvrusb2_debug); 143 pvrusb2_debug,pvrusb2_debug);
134 144
145 pvr2_trace(PVR2_TRACE_INIT,"pvr_init complete");
146
135 return ret; 147 return ret;
136} 148}
137 149
@@ -144,6 +156,10 @@ static void __exit pvr_exit(void)
144#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS 156#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS
145 pvr2_sysfs_class_destroy(class_ptr); 157 pvr2_sysfs_class_destroy(class_ptr);
146#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ 158#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */
159
160 pvr2_context_global_done();
161
162 pvr2_trace(PVR2_TRACE_INIT,"pvr_exit complete");
147} 163}
148 164
149module_init(pvr_init); 165module_init(pvr_init);