/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2019, The Linux Foundation. All rights reserved. */ #ifndef _ION_KERNEL_H #define _ION_KERNEL_H #include #include #ifdef CONFIG_ION /* * Allocates an ION buffer. */ struct dma_buf *ion_alloc(size_t len, unsigned int heap_id_mask, unsigned int flags); #else static inline struct dma_buf *ion_alloc(size_t len, unsigned int heap_id_mask, unsigned int flags) { return ERR_PTR(-ENOMEM); } #endif /* CONFIG_ION */ #endif /* _ION_KERNEL_H */