示例#1
0
/*
 * pvr_init() / pvr_exit()
 *
 * This code is run to initialize/exit the driver.
 *
 */
static int __init pvr_init(void)
{
	int ret;

	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 */

	ret = usb_register(&pvr_driver);

	if (ret == 0)
		printk(KERN_INFO "pvrusb2: " DRIVER_VERSION ":"
		       DRIVER_DESC "\n");
	if (pvrusb2_debug)
		printk(KERN_INFO "pvrusb2: Debug mask is %d (0x%x)\n",
		       pvrusb2_debug,pvrusb2_debug);

	pvr2_trace(PVR2_TRACE_INIT,"pvr_init complete");

	return ret;
}
示例#2
0
/*
 * pvr_init() / pvr_exit()
 *
 * This code is run to initialize/exit the driver.
 *
 */
static int __init pvr_init(void)
{
	int ret;

	pvr2_trace(PVR2_TRACE_INIT,"pvr_init");

#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS
	class_ptr = pvr2_sysfs_class_create();
#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */

	ret = usb_register(&pvr_driver);

	if (ret == 0)
		info(DRIVER_DESC " : " DRIVER_VERSION);
	if (pvrusb2_debug) info("Debug mask is %d (0x%x)",
				pvrusb2_debug,pvrusb2_debug);

	return ret;
}