From: Hauke Mehrtens Date: Thu, 31 Mar 2011 16:21:33 +0000 (-0700) Subject: compat: add support for kernel 2.6.39 X-Git-Tag: v2.6.39-rc1-2~2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=c5e0937ca70b79644c1c518287978a2f14f698db;p=~emulex%2Fcompat.git compat: add support for kernel 2.6.39 Signed-off-by: Hauke Mehrtens --- diff --git a/include/linux/compat-2.6.39.h b/include/linux/compat-2.6.39.h index bf4442b..2c62d90 100644 --- a/include/linux/compat-2.6.39.h +++ b/include/linux/compat-2.6.39.h @@ -8,23 +8,6 @@ #include #include -/* - * 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 tiocmget(tty) tiocmget(tty, NULL) #define tiocmset(tty, set, clear) tiocmset(tty, NULL, set, clear) diff --git a/include/linux/compat-2.6.40.h b/include/linux/compat-2.6.40.h new file mode 100644 index 0000000..42f9fee --- /dev/null +++ b/include/linux/compat-2.6.40.h @@ -0,0 +1,27 @@ +#ifndef LINUX_26_40_COMPAT_H +#define LINUX_26_40_COMPAT_H + +#include + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40)) + +/* + * 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 */ diff --git a/include/linux/compat-2.6.h b/include/linux/compat-2.6.h index 478f833..8e45fc0 100644 --- a/include/linux/compat-2.6.h +++ b/include/linux/compat-2.6.h @@ -32,5 +32,6 @@ #include #include #include +#include #endif /* LINUX_26_COMPAT_H */