File ndiswrapper-1.58-kernel-3.9.patch of Package ndiswrapper.openSUSE_13.1_Update

Description: Support kernel 3.9
 The add_taint() function receives two arguments in 3.9
Index: ndiswrapper-1.58/driver/loader.c
===================================================================
--- ndiswrapper-1.58.orig/driver/loader.c
+++ ndiswrapper-1.58/driver/loader.c
@@ -575,7 +575,11 @@ static int load_user_space_driver(struct
 	} else {
 		printk(KERN_INFO "%s: driver %s (%s) loaded\n",
 		       DRIVER_NAME, wrap_driver->name, wrap_driver->version);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
 		add_taint(TAINT_PROPRIETARY_MODULE);
+#else
+		add_taint(TAINT_PROPRIETARY_MODULE, LOCKDEP_NOW_UNRELIABLE);
+#endif
 		EXIT1(return 0);
 	}
 }
Index: ndiswrapper-1.58/driver/wrapper.c
===================================================================
--- ndiswrapper-1.58.orig/driver/wrapper.c
+++ ndiswrapper-1.58/driver/wrapper.c
@@ -72,7 +72,11 @@ static void module_cleanup(void)
 static int __init wrapper_init(void)
 {
 #ifdef TAINT_OOT_MODULE
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
 	add_taint(TAINT_OOT_MODULE);
+#else
+	add_taint(TAINT_OOT_MODULE, LOCKDEP_NOW_UNRELIABLE);
+#endif
 #endif
 	printk(KERN_INFO "%s version %s loaded (smp=%s, preempt=%s)\n",
 	       DRIVER_NAME, DRIVER_VERSION,
Index: ndiswrapper-1.58/driver/workqueue.c
===================================================================
--- ndiswrapper-1.58.orig/driver/workqueue.c
+++ ndiswrapper-1.58/driver/workqueue.c
@@ -53,7 +53,6 @@ static int workq_thread(void *data)
 	WORKTRACE("%p, %d, %p", workq, thread_data->index, thread);
 	strncpy(thread->name, current->comm, sizeof(thread->name));
 
-	daemonize(thread->name);
 	set_user_nice(current, -5);
 
 	if (thread->task != current) {
openSUSE Build Service is sponsored by