From 2936c7cf5a570ad83e690bb0742972817d5da833 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 31 Mar 2011 09:21:33 -0700 Subject: [PATCH] compat: add support for kernel 2.6.39 Signed-off-by: Hauke Mehrtens --- include/linux/compat-2.6.39.h | 17 ----------------- include/linux/compat-2.6.40.h | 27 +++++++++++++++++++++++++++ include/linux/compat-2.6.h | 1 + 3 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 include/linux/compat-2.6.40.h diff --git a/include/linux/compat-2.6.39.h b/include/linux/compat-2.6.39.h index bf4442bf6390..2c62d90e89a4 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 000000000000..42f9feeb53a9 --- /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 478f833c5751..8e45fc06a6e7 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 */ -- 2.30.2