]> git.openfabrics.org - ~tnikolova/compat/.git/commitdiff
compat: add some workarounds for Debian squeeze
authorHauke Mehrtens <hauke@hauke-m.de>
Tue, 8 Nov 2011 20:46:31 +0000 (21:46 +0100)
committerLuis R. Rodriguez <mcgrof@qca.qualcomm.com>
Tue, 8 Nov 2011 20:58:14 +0000 (12:58 -0800)
Debian squeeze also backports some stuff and this conflicts with compat
wireless stuff. This is a nice way of making compat work with debian
squeeze without breaking normal kernels.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/linux/compat-2.6.33.h
include/linux/compat-2.6.34.h

index 386ee4c9c0ad02b7062bfefe4fdd05477030db62..539b46920f91fe6de6c9292c9db2cdc2df996388 100644 (file)
@@ -55,6 +55,9 @@ static inline void compat_release_firmware(const struct firmware *fw)
 /* this will never happen on older kernels */
 #define NETDEV_POST_INIT 0xffff
 
+/* mask netdev_alloc_skb_ip_align as debian squeeze also backports this */
+#define netdev_alloc_skb_ip_align(a, b) compat_netdev_alloc_skb_ip_align(a, b)
+
 static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
                 unsigned int length)
 {
@@ -107,6 +110,9 @@ int pccard_loop_tuple(struct pcmcia_socket *s, unsigned int function,
 
 #define sock_recv_ts_and_drops(msg, sk, skb) sock_recv_timestamp(msg, sk, skb)
 
+/* mask pci_pcie_cap as debian squeeze also backports this */
+#define pci_pcie_cap(a) compat_pci_pcie_cap(a)
+
 /**
  * pci_pcie_cap - get the saved PCIe capability offset
  * @dev: PCI device
@@ -144,6 +150,9 @@ static inline bool pci_is_pcie(struct pci_dev *dev)
 #define __always_unused                        /* unimplemented */
 #endif
 
+/* mask IS_ERR_OR_NULL as debian squeeze also backports this */
+#define IS_ERR_OR_NULL(a) compat_IS_ERR_OR_NULL(a)
+
 static inline long __must_check IS_ERR_OR_NULL(const void *ptr)
 {
        return !ptr || IS_ERR_VALUE((unsigned long)ptr);
index 0ab344cec0d09373f40f7ef4174b8b5dad73a17d..562ccf7975cb0709b931541ce23ea8981716032c 100644 (file)
@@ -212,6 +212,8 @@ do {                                                        \
 #define usb_alloc_coherent(dev, size, mem_flags, dma) usb_buffer_alloc(dev, size, mem_flags, dma)
 #define usb_free_coherent(dev, size, addr, dma) usb_buffer_free(dev, size, addr, dma)
 
+/* only include this if DEFINE_DMA_UNMAP_ADDR is not set as debian squeeze also backports this  */
+#ifndef DEFINE_DMA_UNMAP_ADDR
 #ifdef CONFIG_NEED_DMA_MAP_STATE
 #define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME)        dma_addr_t ADDR_NAME
 #define DEFINE_DMA_UNMAP_LEN(LEN_NAME)          __u32 LEN_NAME
@@ -227,6 +229,10 @@ do {                                                       \
 #define dma_unmap_len(PTR, LEN_NAME)             (0)
 #define dma_unmap_len_set(PTR, LEN_NAME, VAL)    do { } while (0)
 #endif
+#endif
+
+/* mask dma_set_coherent_mask as debian squeeze also backports this */
+#define dma_set_coherent_mask(a, b) compat_dma_set_coherent_mask(a, b)
 
 static inline int dma_set_coherent_mask(struct device *dev, u64 mask)
 {