dma-mapping: use unsigned long for dma_attrs
[deliverable/linux.git] / drivers / infiniband / core / umem.c
index fe4d2e1a8b58750f961839a53c045d9f72ae1590..c68746ce6624cdd7f0fcc9ecd4db851e45c4b497 100644 (file)
@@ -37,7 +37,6 @@
 #include <linux/sched.h>
 #include <linux/export.h>
 #include <linux/hugetlb.h>
-#include <linux/dma-attrs.h>
 #include <linux/slab.h>
 #include <rdma/ib_umem_odp.h>
 
@@ -92,12 +91,12 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
        unsigned long npages;
        int ret;
        int i;
-       DEFINE_DMA_ATTRS(attrs);
+       unsigned long dma_attrs = 0;
        struct scatterlist *sg, *sg_list_start;
        int need_release = 0;
 
        if (dmasync)
-               dma_set_attr(DMA_ATTR_WRITE_BARRIER, &attrs);
+               dma_attrs |= DMA_ATTR_WRITE_BARRIER;
 
        if (!size)
                return ERR_PTR(-EINVAL);
@@ -215,7 +214,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
                                  umem->sg_head.sgl,
                                  umem->npages,
                                  DMA_BIDIRECTIONAL,
-                                 &attrs);
+                                 dma_attrs);
 
        if (umem->nmap <= 0) {
                ret = -ENOMEM;
This page took 0.039113 seconds and 5 git commands to generate.