]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/arm64/include/asm/dma-mapping.h
Merge tag 'dma-mapping-4.13' of git://git.infradead.org/users/hch/dma-mapping
[linux.git] / arch / arm64 / include / asm / dma-mapping.h
index 505756cdc67a1deba4ff49491392f95a8290af57..0df756b248633fa76b564ef37540b21d1b59bc63 100644 (file)
 #include <xen/xen.h>
 #include <asm/xen/hypervisor.h>
 
-#define DMA_ERROR_CODE (~(dma_addr_t)0)
 extern const struct dma_map_ops dummy_dma_ops;
 
-static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev)
+static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
 {
-       if (dev && dev->dma_ops)
-               return dev->dma_ops;
-
        /*
         * We expect no ISA devices, and all other DMA masters are expected to
         * have someone call arch_setup_dma_ops at device creation time.
@@ -39,14 +35,6 @@ static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev)
        return &dummy_dma_ops;
 }
 
-static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
-{
-       if (xen_initial_domain())
-               return xen_dma_ops;
-       else
-               return __generic_dma_ops(NULL);
-}
-
 void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
                        const struct iommu_ops *iommu, bool coherent);
 #define arch_setup_dma_ops     arch_setup_dma_ops
@@ -59,8 +47,6 @@ void arch_teardown_dma_ops(struct device *dev);
 /* do not use this function in a driver */
 static inline bool is_device_dma_coherent(struct device *dev)
 {
-       if (!dev)
-               return false;
        return dev->archdata.dma_coherent;
 }