From patchwork Tue Feb 1 21:04:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 523851 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p11L4PXn025753 for ; Tue, 1 Feb 2011 21:04:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752444Ab1BAVEX (ORCPT ); Tue, 1 Feb 2011 16:04:23 -0500 Received: from server19320154104.serverpool.info ([193.201.54.104]:52571 "EHLO hauke-m.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751706Ab1BAVEW (ORCPT ); Tue, 1 Feb 2011 16:04:22 -0500 Received: from localhost (localhost [127.0.0.1]) by hauke-m.de (Postfix) with ESMTP id 59B2C8880; Tue, 1 Feb 2011 22:04:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at hauke-m.de Received: from hauke-m.de ([127.0.0.1]) by localhost (hauke-m.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Iu5JBEhnH4yJ; Tue, 1 Feb 2011 22:04:17 +0100 (CET) Received: from localhost.localdomain (host-091-097-249-218.ewe-ip-backbone.de [91.97.249.218]) by hauke-m.de (Postfix) with ESMTPSA id 7616B88D4; Tue, 1 Feb 2011 22:04:17 +0100 (CET) From: Hauke Mehrtens To: mcgrof@gmail.com Cc: linux-wireless@vger.kernel.org, Hauke Mehrtens Subject: [PATCH 2/2] compat: add support for kernel 2.6.38 Date: Tue, 1 Feb 2011 22:04:13 +0100 Message-Id: <1296594253-21273-2-git-send-email-hauke@hauke-m.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1296594253-21273-1-git-send-email-hauke@hauke-m.de> References: <1296594253-21273-1-git-send-email-hauke@hauke-m.de> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 01 Feb 2011 21:04:25 +0000 (UTC) diff --git a/include/linux/compat-2.6.38.h b/include/linux/compat-2.6.38.h index 0521156..004fe27 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 0000000..c0c98fd --- /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 2706797..478f833 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 */