From: Hauke Mehrtens Date: Tue, 1 Feb 2011 21:04:13 +0000 (+0100) Subject: compat: add support for kernel 2.6.38 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=236993030f0b793f398941a2e3365cf66589b76c;p=openwrt%2Fstaging%2Fblogic.git compat: add support for kernel 2.6.38 Signed-off-by: Hauke Mehrtens --- diff --git a/include/linux/compat-2.6.38.h b/include/linux/compat-2.6.38.h index 05211564e36d..004fe274c22f 100644 --- a/include/linux/compat-2.6.38.h +++ b/include/linux/compat-2.6.38.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 - /* rename member in struct mmc_host in include/linux/mmc/host.h */ #define max_segs max_hw_segs diff --git a/include/linux/compat-2.6.39.h b/include/linux/compat-2.6.39.h new file mode 100644 index 000000000000..c0c98fdb6d61 --- /dev/null +++ b/include/linux/compat-2.6.39.h @@ -0,0 +1,27 @@ +#ifndef LINUX_26_39_COMPAT_H +#define LINUX_26_39_COMPAT_H + +#include + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) + +/* + * 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,39)) */ + +#endif /* LINUX_26_39_COMPAT_H */ diff --git a/include/linux/compat-2.6.h b/include/linux/compat-2.6.h index 2706797c33d6..478f833c5751 100644 --- a/include/linux/compat-2.6.h +++ b/include/linux/compat-2.6.h @@ -31,5 +31,6 @@ #include #include #include +#include #endif /* LINUX_26_COMPAT_H */