]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/kthread.c
Minor repairs in sources
[lincan.git] / lincan / src / kthread.c
index d2531b961e6325785297f7fa26f0c6f373255518..1dfd253d0e3fd492c03c4495b699680d82435838 100644 (file)
@@ -1,5 +1,7 @@
-#include <linux/config.h>
 #include <linux/version.h>
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
+       #include <linux/config.h>
+#endif
 
 #if defined(MODVERSIONS)
 #include <linux/modversions.h>
@@ -9,7 +11,7 @@
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,40))
   #include <linux/tqueue.h>
-#else
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18))
   #include <linux/devfs_fs_kernel.h>
 #endif
 
@@ -99,7 +101,7 @@ void stop_kthread(kthread_t *kthread)
     init_MUTEX_LOCKED(&kthread->startstop_sem);
 
     /* We need to do a memory barrier here to be sure that
-       the flags are visible on all CPUs. 
+       the flags are visible on all CPUs.
     */
     mb();
 
@@ -107,7 +109,7 @@ void stop_kthread(kthread_t *kthread)
     kthread->terminate = 1;
 
     /* We need to do a memory barrier here to be sure that
-       the flags are visible on all CPUs. 
+       the flags are visible on all CPUs.
     */
     mb();
     kill_proc(kthread->thread->pid, SIGKILL, 1);