Exemple #1
0
static void request_module_async(void *ptr)
{
	struct cx18 *dev = (struct cx18 *) ptr;
#else
static void request_module_async(struct work_struct *work)
{
	struct cx18 *dev = container_of(work, struct cx18, request_module_wk);

#endif
	/* Make sure cx18-alsa module is loaded */
	request_module("cx18-alsa");

	/* Initialize cx18-alsa for this instance of the cx18 device */
	if (cx18_ext_init != NULL)
		cx18_ext_init(dev);
}

static void request_modules(struct cx18 *dev)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
	INIT_WORK(&dev->request_module_wk, request_module_async, (void *)dev);
#else
	INIT_WORK(&dev->request_module_wk, request_module_async);
#endif
	schedule_work(&dev->request_module_wk);
}
Exemple #2
0
static void request_module_async(struct work_struct *work)
{
	struct cx18 *dev = container_of(work, struct cx18, request_module_wk);

	/* Make sure cx18-alsa module is loaded */
	request_module("cx18-alsa");

	/* Initialize cx18-alsa for this instance of the cx18 device */
	if (cx18_ext_init != NULL)
		cx18_ext_init(dev);
}