# HG changeset patch
# User Florian Pose <fp@igh-essen.com>
# Date 1236589689 0
# Node ID 61793d845ad6fda400f89cc49aeb378425aaa52b
# Parent  dcfb518d24ebd80cb7b2ff1f14b2f4631ab38d8a
Preparations to compile against 2.6.27.

diff -r dcfb518d24eb -r 61793d845ad6 master/master.c
--- a/master/master.c	Mon Mar 09 08:42:49 2009 +0000
+++ b/master/master.c	Mon Mar 09 09:08:09 2009 +0000
@@ -202,18 +202,22 @@
     if (ret)
         goto out_clear_fsm;
     
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+    master->class_device = device_create(class, NULL,
+            MKDEV(MAJOR(device_number), master->index), NULL,
+            "EtherCAT%u", master->index);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
     master->class_device = device_create(class, NULL,
             MKDEV(MAJOR(device_number), master->index),
             "EtherCAT%u", master->index);
 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)
     master->class_device = class_device_create(class, NULL,
-            MKDEV(MAJOR(device_number), master->index),
-            NULL, "EtherCAT%u", master->index);
+            MKDEV(MAJOR(device_number), master->index), NULL,
+            "EtherCAT%u", master->index);
 #else
     master->class_device = class_device_create(class,
-            MKDEV(MAJOR(device_number), master->index),
-            NULL, "EtherCAT%u", master->index);
+            MKDEV(MAJOR(device_number), master->index), NULL,
+            "EtherCAT%u", master->index);
 #endif
     if (IS_ERR(master->class_device)) {
         EC_ERR("Failed to create class device!\n");
diff -r dcfb518d24eb -r 61793d845ad6 master/master.h
--- a/master/master.h	Mon Mar 09 08:42:49 2009 +0000
+++ b/master/master.h	Mon Mar 09 09:08:09 2009 +0000
@@ -42,7 +42,12 @@
 #include <linux/timer.h>
 #include <linux/wait.h>
 #include <linux/kthread.h>
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+#include <linux/semaphore.h>
+#else
 #include <asm/semaphore.h>
+#endif
 
 #include "device.h"
 #include "domain.h"