From: Mike Marciniszyn Date: Mon, 21 May 2012 12:55:15 +0000 (-0400) Subject: compat: move <= 3.0 neighbour routines to compat-3.1.h X-Git-Tag: compat-2012-07-02~7 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=7823ad8b99ba77e92439419e78d1de7c305cb6c8;p=~emulex%2Ffor-vlad%2Fcompat.git compat: move <= 3.0 neighbour routines to compat-3.1.h 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 --- diff --git a/include/linux/compat-3.1.h b/include/linux/compat-3.1.h index 5b00ac9..9845aea 100644 --- a/include/linux/compat-3.1.h +++ b/include/linux/compat-3.1.h @@ -6,6 +6,22 @@ #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)) #include +#include + +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 index 08e0a8b..0000000 --- a/include/net/dst.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _COMPAT_NET_DST_H -#define _COMPAT_NET_DST_H 1 - -#include - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0)) -#include_next -#else /* (LINUX_VERSION_CODE > KERNEL_VERSION(3,0,0)) */ -#include_next - -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 */