]> git.openfabrics.org - ~emulex/compat.git/commitdiff
compat: add support for kernel 3.0
authorHauke Mehrtens <hauke@hauke-m.de>
Thu, 9 Jun 2011 22:04:43 +0000 (00:04 +0200)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Tue, 14 Jun 2011 18:09:53 +0000 (11:09 -0700)
Kernel 2.6.40 is now 3.0. The br_port_exists() is function is not in
3.0 yet, so it should go to compat-3.1.h

Add to compat-3.0-stable

include/linux/compat-2.6.40.h [deleted file]
include/linux/compat-2.6.h
include/linux/compat-3.1.h [new file with mode: 0644]

diff --git a/include/linux/compat-2.6.40.h b/include/linux/compat-2.6.40.h
deleted file mode 100644 (file)
index b3fc8f7..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef LINUX_26_40_COMPAT_H
-#define LINUX_26_40_COMPAT_H
-
-#include <linux/version.h>
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40))
-
-#include <linux/rcupdate.h>
-
-/*
- * This is not part of The 2.6.37 kernel yet but we
- * we use it to optimize the backport code we
- * need to implement. Instead of using ifdefs
- * to check what version of the check we use
- * we just replace all checks on current code
- * with this. I'll submit this upstream too, that
- * way all we'd have to do is to implement this
- * for older kernels, then we would not have to
- * edit the upstrema code for backport efforts.
- */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
-#define br_port_exists(dev)    (dev->priv_flags & IFF_BRIDGE_PORT)
-#else
-#define br_port_exists(dev)    (dev->br_port)
-#endif
-
-#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40)) */
-
-#endif /* LINUX_26_40_COMPAT_H */
index 8e45fc06a6e78a78bb7044c1fd16c333c1f0fe3a..893a1590bb0073d6be7fc46e1d861397a48df5ab 100644 (file)
@@ -32,6 +32,6 @@
 #include <linux/compat-2.6.37.h>
 #include <linux/compat-2.6.38.h>
 #include <linux/compat-2.6.39.h>
-#include <linux/compat-2.6.40.h>
+#include <linux/compat-3.1.h>
 
 #endif /* LINUX_26_COMPAT_H */
diff --git a/include/linux/compat-3.1.h b/include/linux/compat-3.1.h
new file mode 100644 (file)
index 0000000..855490e
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef LINUX_3_1_COMPAT_H
+#define LINUX_3_1_COMPAT_H
+
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
+
+/*
+ * This is not part of The 2.6.37 kernel yet but we
+ * we use it to optimize the backport code we
+ * need to implement. Instead of using ifdefs
+ * to check what version of the check we use
+ * we just replace all checks on current code
+ * with this. I'll submit this upstream too, that
+ * way all we'd have to do is to implement this
+ * for older kernels, then we would not have to
+ * edit the upstrema code for backport efforts.
+ */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#define br_port_exists(dev)    (dev->priv_flags & IFF_BRIDGE_PORT)
+#else
+#define br_port_exists(dev)    (dev->br_port)
+#endif
+
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)) */
+
+#endif /* LINUX_3_1_COMPAT_H */