X-Git-Url: https://git.openfabrics.org/?p=~tnikolova%2Fcompat%2F.git;a=blobdiff_plain;f=include%2Flinux%2Fcompat-3.17.h;h=848291fa73300aa98b2de6f4147ff4c27ffb40fe;hp=0e5e4247a7453f700236e0f09bba63fa133173eb;hb=f6e653817ae39ddd1daf31292ec7b41bc8b46841;hpb=7fb1041e4e87311f8dbcc08739a963e97da15756 diff --git a/include/linux/compat-3.17.h b/include/linux/compat-3.17.h index 0e5e424..848291f 100644 --- a/include/linux/compat-3.17.h +++ b/include/linux/compat-3.17.h @@ -3,9 +3,21 @@ #include #include "../../compat/config.h" +#include +#include +#include #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) +#define pci_zalloc_consistent backport_pci_zalloc_consistent +static inline void * +backport_pci_zalloc_consistent(struct pci_dev *hwdev, size_t size, + dma_addr_t *dma_handle) +{ + return dma_zalloc_coherent(hwdev == NULL ? NULL : &hwdev->dev, + size, dma_handle, GFP_ATOMIC); +} + #ifndef HAVE_KTIME_GET_REAL_NS #include #include