]> git.openfabrics.org - ~emulex/for-vlad/old/compat.git/commitdiff
compat: move br_port_exists() to compat-2.6.36.h
authorHauke Mehrtens <hauke@hauke-m.de>
Thu, 26 Jan 2012 22:51:45 +0000 (23:51 +0100)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Tue, 31 Jan 2012 22:47:17 +0000 (14:47 -0800)
br_port_exists() was moved to a new compat-*.h file for every new
kernel release, as it is not in mainline. This patch moves it to compat-
2.6.36.h so it has not to be moved any more for a new kernel version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
include/linux/compat-2.6.36.h
include/linux/compat-3.3.h

index b5d9975fc22230a98117a7fc08936bdb6cf7bb99..314fb35305e0ce00c6d1f30dedafaf2f2d1ce8af 100644 (file)
@@ -142,6 +142,8 @@ extern struct workqueue_struct *system_nrt_wq;
 void compat_system_workqueue_create(void);
 void compat_system_workqueue_destroy(void);
 
+#define br_port_exists(dev)    (dev->br_port)
+
 #else
 
 static inline void compat_system_workqueue_create(void)
@@ -152,6 +154,19 @@ static inline void compat_system_workqueue_destroy(void)
 {
 }
 
+/*
+ * 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.
+ */
+#define br_port_exists(dev)    (dev->priv_flags & IFF_BRIDGE_PORT)
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) */
 
 #endif /* LINUX_26_36_COMPAT_H */
index 821333c4e9385011d5727db544ed63482ec70b08..4965f2346220566856f98524a713127404c7d415 100644 (file)
@@ -8,23 +8,6 @@
 /* include to override NL80211_FEATURE_SK_TX_STATUS */
 #include <linux/nl80211.h>
 
-/*
- * 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
-
 static inline void skb_complete_wifi_ack(struct sk_buff *skb, bool acked)
 {
        WARN_ON(1);