mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
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: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20240726-dev-iio-dma-buf-mod-namespace-v1-1-8877cfe7f68e@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
8293a60cb5
commit
8cfb75d78a
@ -248,7 +248,7 @@ void iio_dma_buffer_block_done(struct iio_dma_buffer_block *block)
|
||||
iio_dma_buffer_queue_wake(queue);
|
||||
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
|
||||
@ -287,7 +287,7 @@ void iio_dma_buffer_block_list_abort(struct iio_dma_buffer_queue *queue,
|
||||
iio_dma_buffer_queue_wake(queue);
|
||||
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)
|
||||
{
|
||||
@ -420,7 +420,7 @@ out_unlock:
|
||||
|
||||
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)
|
||||
{
|
||||
@ -506,7 +506,7 @@ int iio_dma_buffer_enable(struct iio_buffer *buffer,
|
||||
|
||||
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
|
||||
@ -530,7 +530,7 @@ int iio_dma_buffer_disable(struct iio_buffer *buffer,
|
||||
|
||||
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,
|
||||
struct iio_dma_buffer_block *block)
|
||||
@ -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);
|
||||
}
|
||||
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
|
||||
@ -653,7 +653,7 @@ int iio_dma_buffer_write(struct iio_buffer *buffer, size_t n,
|
||||
return iio_dma_buffer_io(buffer, n,
|
||||
(__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
|
||||
@ -696,7 +696,7 @@ size_t iio_dma_buffer_usage(struct iio_buffer *buf)
|
||||
|
||||
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 *
|
||||
iio_dma_buffer_attach_dmabuf(struct iio_buffer *buffer,
|
||||
@ -723,7 +723,7 @@ iio_dma_buffer_attach_dmabuf(struct iio_buffer *buffer,
|
||||
|
||||
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,
|
||||
struct iio_dma_buffer_block *block)
|
||||
@ -731,7 +731,7 @@ void iio_dma_buffer_detach_dmabuf(struct iio_buffer *buffer,
|
||||
block->state = IIO_BLOCK_STATE_DEAD;
|
||||
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)
|
||||
{
|
||||
@ -784,7 +784,7 @@ out_end_signalling:
|
||||
|
||||
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)
|
||||
{
|
||||
@ -792,7 +792,7 @@ void iio_dma_buffer_lock_queue(struct iio_buffer *buffer)
|
||||
|
||||
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)
|
||||
{
|
||||
@ -800,7 +800,7 @@ void iio_dma_buffer_unlock_queue(struct iio_buffer *buffer)
|
||||
|
||||
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
|
||||
@ -816,7 +816,7 @@ int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd)
|
||||
|
||||
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
|
||||
@ -836,7 +836,7 @@ int iio_dma_buffer_set_length(struct iio_buffer *buffer, unsigned int length)
|
||||
|
||||
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
|
||||
@ -864,7 +864,7 @@ int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue,
|
||||
|
||||
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
|
||||
@ -882,7 +882,7 @@ void iio_dma_buffer_exit(struct iio_dma_buffer_queue *queue)
|
||||
|
||||
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
|
||||
@ -896,7 +896,7 @@ void iio_dma_buffer_release(struct iio_dma_buffer_queue *queue)
|
||||
{
|
||||
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_DESCRIPTION("DMA buffer for the IIO framework");
|
||||
|
@ -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_DESCRIPTION("DMA buffer for the IIO framework");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(IIO_DMA_BUFFER);
|
||||
|
Loading…
Reference in New Issue
Block a user