]> git.openfabrics.org - ~tnikolova/compat/.git/commitdiff
compat: fix build with kernel 2.6.37rc1
authorHauke Mehrtens <hauke@hauke-m.de>
Fri, 5 Nov 2010 19:27:02 +0000 (20:27 +0100)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Fri, 5 Nov 2010 21:25:20 +0000 (14:25 -0700)
Some backports are also needed when compiling against kernel 2.6.37.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/linux/compat-2.6.37.h
include/linux/compat-2.6.38.h [new file with mode: 0644]
include/linux/compat-2.6.h

index 716f528a0bf5950d5d4f3f8c7dce47eccc040b4c..6c026a34c31857a9c6229c530ce3c04ea82790e9 100644 (file)
@@ -7,23 +7,6 @@
 
 #include <linux/skbuff.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
-
 #define SDIO_CLASS_BT_AMP      0x09    /* Type-A Bluetooth AMP interface */
 
 extern struct kobj_ns_type_operations net_ns_type_operations;
@@ -110,9 +93,6 @@ int genl_unregister_family(struct genl_family *family);
 #define genl_register_mc_group(_fam, _grp) genl_register_mc_group(&(_fam)->family, _grp)
 #define genl_unregister_mc_group(_fam, _grp) genl_unregister_mc_group(&(_fam)->family, _grp)
 
-/* rename member in struct mmc_host in include/linux/mmc/host.h */
-#define max_segs       max_hw_segs
-
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) */
 
 #endif /* LINUX_26_37_COMPAT_H */
diff --git a/include/linux/compat-2.6.38.h b/include/linux/compat-2.6.38.h
new file mode 100644 (file)
index 0000000..fa77a89
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef LINUX_26_38_COMPAT_H
+#define LINUX_26_38_COMPAT_H
+
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38))
+
+/*
+ * 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
+
+/* rename member in struct mmc_host in include/linux/mmc/host.h */
+#define max_segs       max_hw_segs
+
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)) */
+
+#endif /* LINUX_26_38_COMPAT_H */
index 25490f2e6dbed1fd9e0aea2b020c73158f20785c..2706797c33d6b95ba924c09a8ee5834216ff08f1 100644 (file)
@@ -30,5 +30,6 @@
 #include <linux/compat-2.6.35.h>
 #include <linux/compat-2.6.36.h>
 #include <linux/compat-2.6.37.h>
+#include <linux/compat-2.6.38.h>
 
 #endif /* LINUX_26_COMPAT_H */