--- a/master/master.h Fri Jun 19 11:46:53 2009 +0000
+++ b/master/master.h Fri Jun 19 11:48:42 2009 +0000
@@ -34,11 +34,16 @@
#ifndef __EC_MASTER_H__
#define __EC_MASTER_H__
+#include <linux/version.h>
#include <linux/list.h>
#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"
@@ -81,7 +86,11 @@
unsigned int reserved; /**< \a True, if the master is in use. */
ec_cdev_t cdev; /**< Master character device. */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+ struct device *class_device; /**< Master class device. */
+#else
struct class_device *class_device; /**< Master class device. */
+#endif
struct semaphore master_sem; /**< Master semaphore. */
ec_device_t main_device; /**< EtherCAT main device. */