Commit 8cfb75d7 authored by Nuno Sa's avatar Nuno Sa Committed by Jonathan Cameron

iio: buffer-dma: Move exports into IIO_DMA_BUFFER namespace

Avoid unnecessary pollution of the global symbol namespace and move
global APIs into a specific namespace. Import that into the places that
use them
Signed-off-by: default avatarNuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240726-dev-iio-dma-buf-mod-namespace-v1-1-8877cfe7f68e@analog.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 8293a60c
...@@ -248,7 +248,7 @@ void iio_dma_buffer_block_done(struct iio_dma_buffer_block *block) ...@@ -248,7 +248,7 @@ void iio_dma_buffer_block_done(struct iio_dma_buffer_block *block)
iio_dma_buffer_queue_wake(queue); iio_dma_buffer_queue_wake(queue);
dma_fence_end_signalling(cookie); dma_fence_end_signalling(cookie);
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_block_done); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_block_done, IIO_DMA_BUFFER);
/** /**
* iio_dma_buffer_block_list_abort() - Indicate that a list block has been * iio_dma_buffer_block_list_abort() - Indicate that a list block has been
...@@ -287,7 +287,7 @@ void iio_dma_buffer_block_list_abort(struct iio_dma_buffer_queue *queue, ...@@ -287,7 +287,7 @@ void iio_dma_buffer_block_list_abort(struct iio_dma_buffer_queue *queue,
iio_dma_buffer_queue_wake(queue); iio_dma_buffer_queue_wake(queue);
dma_fence_end_signalling(cookie); dma_fence_end_signalling(cookie);
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_block_list_abort); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_block_list_abort, IIO_DMA_BUFFER);
static bool iio_dma_block_reusable(struct iio_dma_buffer_block *block) static bool iio_dma_block_reusable(struct iio_dma_buffer_block *block)
{ {
...@@ -420,7 +420,7 @@ int iio_dma_buffer_request_update(struct iio_buffer *buffer) ...@@ -420,7 +420,7 @@ int iio_dma_buffer_request_update(struct iio_buffer *buffer)
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_request_update); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_request_update, IIO_DMA_BUFFER);
static void iio_dma_buffer_fileio_free(struct iio_dma_buffer_queue *queue) static void iio_dma_buffer_fileio_free(struct iio_dma_buffer_queue *queue)
{ {
...@@ -506,7 +506,7 @@ int iio_dma_buffer_enable(struct iio_buffer *buffer, ...@@ -506,7 +506,7 @@ int iio_dma_buffer_enable(struct iio_buffer *buffer,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_enable); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_enable, IIO_DMA_BUFFER);
/** /**
* iio_dma_buffer_disable() - Disable DMA buffer * iio_dma_buffer_disable() - Disable DMA buffer
...@@ -530,7 +530,7 @@ int iio_dma_buffer_disable(struct iio_buffer *buffer, ...@@ -530,7 +530,7 @@ int iio_dma_buffer_disable(struct iio_buffer *buffer,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_disable); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_disable, IIO_DMA_BUFFER);
static void iio_dma_buffer_enqueue(struct iio_dma_buffer_queue *queue, static void iio_dma_buffer_enqueue(struct iio_dma_buffer_queue *queue,
struct iio_dma_buffer_block *block) struct iio_dma_buffer_block *block)
...@@ -636,7 +636,7 @@ int iio_dma_buffer_read(struct iio_buffer *buffer, size_t n, ...@@ -636,7 +636,7 @@ int iio_dma_buffer_read(struct iio_buffer *buffer, size_t n,
{ {
return iio_dma_buffer_io(buffer, n, user_buffer, false); return iio_dma_buffer_io(buffer, n, user_buffer, false);
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_read); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_read, IIO_DMA_BUFFER);
/** /**
* iio_dma_buffer_write() - DMA buffer write callback * iio_dma_buffer_write() - DMA buffer write callback
...@@ -653,7 +653,7 @@ int iio_dma_buffer_write(struct iio_buffer *buffer, size_t n, ...@@ -653,7 +653,7 @@ int iio_dma_buffer_write(struct iio_buffer *buffer, size_t n,
return iio_dma_buffer_io(buffer, n, return iio_dma_buffer_io(buffer, n,
(__force __user char *)user_buffer, true); (__force __user char *)user_buffer, true);
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_write); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_write, IIO_DMA_BUFFER);
/** /**
* iio_dma_buffer_usage() - DMA buffer data_available and * iio_dma_buffer_usage() - DMA buffer data_available and
...@@ -696,7 +696,7 @@ size_t iio_dma_buffer_usage(struct iio_buffer *buf) ...@@ -696,7 +696,7 @@ size_t iio_dma_buffer_usage(struct iio_buffer *buf)
return data_available; return data_available;
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_usage); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_usage, IIO_DMA_BUFFER);
struct iio_dma_buffer_block * struct iio_dma_buffer_block *
iio_dma_buffer_attach_dmabuf(struct iio_buffer *buffer, iio_dma_buffer_attach_dmabuf(struct iio_buffer *buffer,
...@@ -723,7 +723,7 @@ iio_dma_buffer_attach_dmabuf(struct iio_buffer *buffer, ...@@ -723,7 +723,7 @@ iio_dma_buffer_attach_dmabuf(struct iio_buffer *buffer,
return block; return block;
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_attach_dmabuf); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_attach_dmabuf, IIO_DMA_BUFFER);
void iio_dma_buffer_detach_dmabuf(struct iio_buffer *buffer, void iio_dma_buffer_detach_dmabuf(struct iio_buffer *buffer,
struct iio_dma_buffer_block *block) struct iio_dma_buffer_block *block)
...@@ -731,7 +731,7 @@ void iio_dma_buffer_detach_dmabuf(struct iio_buffer *buffer, ...@@ -731,7 +731,7 @@ void iio_dma_buffer_detach_dmabuf(struct iio_buffer *buffer,
block->state = IIO_BLOCK_STATE_DEAD; block->state = IIO_BLOCK_STATE_DEAD;
iio_buffer_block_put_atomic(block); iio_buffer_block_put_atomic(block);
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_detach_dmabuf); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_detach_dmabuf, IIO_DMA_BUFFER);
static int iio_dma_can_enqueue_block(struct iio_dma_buffer_block *block) static int iio_dma_can_enqueue_block(struct iio_dma_buffer_block *block)
{ {
...@@ -784,7 +784,7 @@ int iio_dma_buffer_enqueue_dmabuf(struct iio_buffer *buffer, ...@@ -784,7 +784,7 @@ int iio_dma_buffer_enqueue_dmabuf(struct iio_buffer *buffer,
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_enqueue_dmabuf); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_enqueue_dmabuf, IIO_DMA_BUFFER);
void iio_dma_buffer_lock_queue(struct iio_buffer *buffer) void iio_dma_buffer_lock_queue(struct iio_buffer *buffer)
{ {
...@@ -792,7 +792,7 @@ void iio_dma_buffer_lock_queue(struct iio_buffer *buffer) ...@@ -792,7 +792,7 @@ void iio_dma_buffer_lock_queue(struct iio_buffer *buffer)
mutex_lock(&queue->lock); mutex_lock(&queue->lock);
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_lock_queue); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_lock_queue, IIO_DMA_BUFFER);
void iio_dma_buffer_unlock_queue(struct iio_buffer *buffer) void iio_dma_buffer_unlock_queue(struct iio_buffer *buffer)
{ {
...@@ -800,7 +800,7 @@ void iio_dma_buffer_unlock_queue(struct iio_buffer *buffer) ...@@ -800,7 +800,7 @@ void iio_dma_buffer_unlock_queue(struct iio_buffer *buffer)
mutex_unlock(&queue->lock); mutex_unlock(&queue->lock);
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_unlock_queue); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_unlock_queue, IIO_DMA_BUFFER);
/** /**
* iio_dma_buffer_set_bytes_per_datum() - DMA buffer set_bytes_per_datum callback * iio_dma_buffer_set_bytes_per_datum() - DMA buffer set_bytes_per_datum callback
...@@ -816,7 +816,7 @@ int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd) ...@@ -816,7 +816,7 @@ int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_set_bytes_per_datum); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_set_bytes_per_datum, IIO_DMA_BUFFER);
/** /**
* iio_dma_buffer_set_length - DMA buffer set_length callback * iio_dma_buffer_set_length - DMA buffer set_length callback
...@@ -836,7 +836,7 @@ int iio_dma_buffer_set_length(struct iio_buffer *buffer, unsigned int length) ...@@ -836,7 +836,7 @@ int iio_dma_buffer_set_length(struct iio_buffer *buffer, unsigned int length)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_set_length); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_set_length, IIO_DMA_BUFFER);
/** /**
* iio_dma_buffer_init() - Initialize DMA buffer queue * iio_dma_buffer_init() - Initialize DMA buffer queue
...@@ -864,7 +864,7 @@ int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue, ...@@ -864,7 +864,7 @@ int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_init); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_init, IIO_DMA_BUFFER);
/** /**
* iio_dma_buffer_exit() - Cleanup DMA buffer queue * iio_dma_buffer_exit() - Cleanup DMA buffer queue
...@@ -882,7 +882,7 @@ void iio_dma_buffer_exit(struct iio_dma_buffer_queue *queue) ...@@ -882,7 +882,7 @@ void iio_dma_buffer_exit(struct iio_dma_buffer_queue *queue)
mutex_unlock(&queue->lock); mutex_unlock(&queue->lock);
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_exit); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_exit, IIO_DMA_BUFFER);
/** /**
* iio_dma_buffer_release() - Release final buffer resources * iio_dma_buffer_release() - Release final buffer resources
...@@ -896,7 +896,7 @@ void iio_dma_buffer_release(struct iio_dma_buffer_queue *queue) ...@@ -896,7 +896,7 @@ void iio_dma_buffer_release(struct iio_dma_buffer_queue *queue)
{ {
mutex_destroy(&queue->lock); mutex_destroy(&queue->lock);
} }
EXPORT_SYMBOL_GPL(iio_dma_buffer_release); EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_release, IIO_DMA_BUFFER);
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
MODULE_DESCRIPTION("DMA buffer for the IIO framework"); MODULE_DESCRIPTION("DMA buffer for the IIO framework");
......
...@@ -348,3 +348,4 @@ EXPORT_SYMBOL_NS_GPL(devm_iio_dmaengine_buffer_setup_ext, IIO_DMAENGINE_BUFFER); ...@@ -348,3 +348,4 @@ EXPORT_SYMBOL_NS_GPL(devm_iio_dmaengine_buffer_setup_ext, IIO_DMAENGINE_BUFFER);
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
MODULE_DESCRIPTION("DMA buffer for the IIO framework"); MODULE_DESCRIPTION("DMA buffer for the IIO framework");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_IMPORT_NS(IIO_DMA_BUFFER);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment