]> git.openfabrics.org - ~emulex/compat.git/commitdiff
compat: move <= 3.0 neighbour routines to compat-3.1.h
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Mon, 21 May 2012 12:55:15 +0000 (08:55 -0400)
committerMike Marciniszyn <mike.marciniszyn@intel.com>
Mon, 21 May 2012 12:55:15 +0000 (08:55 -0400)
This patch removes the include/net/dst.h in favor of
moving the routines into compat-3.1.h.

This fixes a compilation issue with the 3.2.0 kernel with
the linux-3.2 repo.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
include/linux/compat-3.1.h
include/net/dst.h [deleted file]

index 5b00ac961805770c63a4b60cb913cc3ad150d022..9845aeae51dbbde6da4469baa17ccceb9a1247c9 100644 (file)
@@ -6,6 +6,22 @@
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
 
 #include <linux/security.h>
+#include <net/dst.h>
+
+static inline struct neighbour *dst_get_neighbour(struct dst_entry *dst)
+{
+       return dst->neighbour;
+}
+
+static inline void dst_set_neighbour(struct dst_entry *dst, struct neighbour *neigh)
+{
+       dst->neighbour = neigh;
+}
+
+static inline struct neighbour *dst_get_neighbour_raw(struct dst_entry *dst)
+{
+       return rcu_dereference_raw(dst->neighbour);
+}
 
 #define genl_dump_check_consistent(cb, user_hdr, family)
 
diff --git a/include/net/dst.h b/include/net/dst.h
deleted file mode 100644 (file)
index 08e0a8b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _COMPAT_NET_DST_H
-#define _COMPAT_NET_DST_H 1
-
-#include <linux/version.h>
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0))
-#include_next <net/dst.h>
-#else /* (LINUX_VERSION_CODE > KERNEL_VERSION(3,0,0)) */
-#include_next <net/dst.h>
-
-static inline struct neighbour *dst_get_neighbour(struct dst_entry *dst)
-{
-       return dst->neighbour;
-}
-
-static inline void dst_set_neighbour(struct dst_entry *dst, struct neighbour *neigh)
-{
-       dst->neighbour = neigh;
-}
-
-static inline struct neighbour *dst_get_neighbour_raw(struct dst_entry *dst)
-{
-       return rcu_dereference_raw(dst->neighbour);
-}
-#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(3,0,0)) */
-
-#endif /* _COMPAT_NET_DST_H */