Preparations to compile against 2.6.27.
--- 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");
--- 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"