diff options
Diffstat (limited to 'kernel/ethosu_buffer.h')
-rw-r--r-- | kernel/ethosu_buffer.h | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/kernel/ethosu_buffer.h b/kernel/ethosu_buffer.h index bc5958c..1829fbe 100644 --- a/kernel/ethosu_buffer.h +++ b/kernel/ethosu_buffer.h @@ -1,5 +1,6 @@ /* - * Copyright 2020,2022-2023 Arm Limited and/or its affiliates + * SPDX-FileCopyrightText: Copyright 2020,2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com> + * SPDX-License-Identifier: GPL-2.0-only * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -14,8 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, you can access it online at * http://www.gnu.org/licenses/gpl-2.0.html. - * - * SPDX-License-Identifier: GPL-2.0-only */ #ifndef ETHOSU_BUFFER_H @@ -40,21 +39,14 @@ struct device; * @dev: Device * @file: File * @kref: Reference counting - * @capacity: Maximum capacity of the buffer - * @offset: Offset to first byte of buffer - * @size: Size of the data in the buffer + * @size: Size of the buffer * @cpu_addr: Kernel mapped address * @dma_addr: DMA address - * @dma_addr_orig: Original DMA address before range mapping - * - * 'offset + size' must not be larger than 'capacity'. */ struct ethosu_buffer { struct device *dev; struct file *file; struct kref kref; - size_t capacity; - size_t offset; size_t size; void *cpu_addr; dma_addr_t dma_addr; @@ -72,7 +64,7 @@ struct ethosu_buffer { * Return: fd on success, else error code. */ int ethosu_buffer_create(struct device *dev, - size_t capacity); + size_t size); /** * ethosu_buffer_get_from_fd() - Get buffer handle from fd @@ -93,13 +85,4 @@ void ethosu_buffer_get(struct ethosu_buffer *buf); */ void ethosu_buffer_put(struct ethosu_buffer *buf); -/** - * ethosu_buffer_resize() - Resize and validate buffer - * - * Return: 0 on success, else error code. - */ -int ethosu_buffer_resize(struct ethosu_buffer *buf, - size_t size, - size_t offset); - #endif /* ETHOSU_BUFFER_H */ |