// SPDX-License-Identifier: GPL-2.0-only /* * helpers for managing a buffer for many packets * * Copyright (c) Clemens Ladisch <[email protected]> */ #include <linux/firewire.h> #include <linux/export.h> #include <linux/slab.h> #include "packets-buffer.h" /** * iso_packets_buffer_init - allocates the memory for packets * @b: the buffer structure to initialize * @unit: the device at the other end of the stream * @count: the number of packets * @packet_size: the (maximum) size of a packet, in bytes * @direction: %DMA_TO_DEVICE or %DMA_FROM_DEVICE */ int iso_packets_buffer_init(struct iso_packets_buffer *b, struct fw_unit *unit, unsigned int count, unsigned int packet_size, enum dma_data_direction direction) { … } EXPORT_SYMBOL(…); /** * iso_packets_buffer_destroy - frees packet buffer resources * @b: the buffer structure to free * @unit: the device at the other end of the stream */ void iso_packets_buffer_destroy(struct iso_packets_buffer *b, struct fw_unit *unit) { … } EXPORT_SYMBOL(…);