diff options
author | Christoph Hellwig <hch@lst.de> | 2020-07-08 09:30:00 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-07-19 09:29:23 +0200 |
commit | 2f9237d4f6df49b74c51cdac555b0a9979d0c237 (patch) | |
tree | 6a09811a657e87bc6b716443993bceb2775a1b8f /include/linux/device.h | |
parent | b4174173005972f8f6497883d08d87e0aba1b604 (diff) | |
download | lwn-2f9237d4f6df49b74c51cdac555b0a9979d0c237.tar.gz lwn-2f9237d4f6df49b74c51cdac555b0a9979d0c237.zip |
dma-mapping: make support for dma ops optional
Avoid the overhead of the dma ops support for tiny builds that only
use the direct mapping.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r-- | include/linux/device.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 15460a5ac024..4c4af98321eb 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -568,8 +568,9 @@ struct device { #ifdef CONFIG_GENERIC_MSI_IRQ struct list_head msi_list; #endif - +#ifdef CONFIG_DMA_OPS const struct dma_map_ops *dma_ops; +#endif u64 *dma_mask; /* dma mask (if dma'able device) */ u64 coherent_dma_mask;/* Like dma_mask, but for alloc_coherent mappings as |