xref: /linux/rust/helpers/dma.c (revision 7a9b709e7cc5ce1ffb84ce07bf6d157e1de758df)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 #include <linux/dma-mapping.h>
4 
5 void *rust_helper_dma_alloc_attrs(struct device *dev, size_t size,
6 				  dma_addr_t *dma_handle, gfp_t flag,
7 				  unsigned long attrs)
8 {
9 	return dma_alloc_attrs(dev, size, dma_handle, flag, attrs);
10 }
11 
12 void rust_helper_dma_free_attrs(struct device *dev, size_t size, void *cpu_addr,
13 				dma_addr_t dma_handle, unsigned long attrs)
14 {
15 	dma_free_attrs(dev, size, cpu_addr, dma_handle, attrs);
16 }
17