[PATCH 3/3] backports: ifdef code already present in RHEL7.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Avoid conflicts with RHEL7.0 as DEVICE_ATTR_* defines,
enum pkt_hash_types, skb_set_hash(), dma_common_get_sgtable()
are already present.

Signed-off-by: Stefan Assmann <sassmann@xxxxxxxxx>
---
 backport/backport-include/linux/device.h | 2 +-
 backport/backport-include/linux/skbuff.h | 2 +-
 backport/compat/dma-shared-helpers.c     | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h
index 3f57bd9..d6226ab 100644
--- a/backport/backport-include/linux/device.h
+++ b/backport/backport-include/linux/device.h
@@ -102,7 +102,7 @@ backport_device_release_driver(struct device *dev)
 #define device_release_driver LINUX_BACKPORT(device_release_driver)
 #endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(3,6,0) */
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) && RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0)
 #ifndef DEVICE_ATTR_RO
 #define DEVICE_ATTR_RO(_name) \
 struct device_attribute dev_attr_ ## _name = __ATTR_RO(_name);
diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h
index fae13b7..2576faf 100644
--- a/backport/backport-include/linux/skbuff.h
+++ b/backport/backport-include/linux/skbuff.h
@@ -327,7 +327,7 @@ static inline void skb_frag_set_page(struct sk_buff *skb, int f,
 }
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) */
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) && RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0)
 /*
  * Packet hash types specify the type of hash in skb_set_hash.
  *
diff --git a/backport/compat/dma-shared-helpers.c b/backport/compat/dma-shared-helpers.c
index f76cf06..2ada681 100644
--- a/backport/compat/dma-shared-helpers.c
+++ b/backport/compat/dma-shared-helpers.c
@@ -20,6 +20,7 @@
 #endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(3,6,0) */
 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */
 
+#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0)
 /*
  * Create scatter-list for the already allocated DMA buffer.
  */
@@ -37,3 +38,4 @@ int dma_common_get_sgtable(struct device *dev, struct sg_table *sgt,
 	return 0;
 }
 EXPORT_SYMBOL_GPL(dma_common_get_sgtable);
+#endif /* RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0) */
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux