summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 9971779)
raw | patch | inline | side by side (from parent 1: 9971779)
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | |
Wed, 28 Nov 2018 10:48:10 +0000 (12:48 +0200) | ||
committer | Tero Kristo <t-kristo@ti.com> | |
Wed, 28 Nov 2018 10:52:31 +0000 (12:52 +0200) |
dma_get_any_slave_channel() would skip using the filter function, which
in some cases needed to be executed before the alloc_chan_resources
callback to make sure that all parameters are provided for the slave
channel.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
in some cases needed to be executed before the alloc_chan_resources
callback to make sure that all parameters are provided for the slave
channel.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
drivers/dma/dmaengine.c | patch | blob | history | |
include/linux/dmaengine.h | patch | blob | history |
index 27b6d7c2d8a07aab4e10aff4e3a6aac5066bfd41..f33fc6a951aa59d16d77c3fd7f75fa4ae1bcb3b7 100644 (file)
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
}
EXPORT_SYMBOL_GPL(dma_get_slave_channel);
-struct dma_chan *dma_get_any_slave_channel(struct dma_device *device)
+struct dma_chan *dmadev_get_slave_channel(struct dma_device *device,
+ dma_filter_fn fn, void *fn_param)
{
dma_cap_mask_t mask;
struct dma_chan *chan;
/* lock against __dma_request_channel */
mutex_lock(&dma_list_mutex);
- chan = find_candidate(device, &mask, NULL, NULL);
+ chan = find_candidate(device, &mask, fn, fn_param);
mutex_unlock(&dma_list_mutex);
return IS_ERR(chan) ? NULL : chan;
}
-EXPORT_SYMBOL_GPL(dma_get_any_slave_channel);
+EXPORT_SYMBOL_GPL(dmadev_get_slave_channel);
/**
* __dma_request_channel - try to allocate an exclusive channel
index fe13a258c3ecd4aacc80d57a3d8f9e60dfe5c433..a383c0bea3d24f47a52dc2d96e4e5aa88dca8afd 100644 (file)
void dma_async_device_unregister(struct dma_device *device);
void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
struct dma_chan *dma_get_slave_channel(struct dma_chan *chan);
-struct dma_chan *dma_get_any_slave_channel(struct dma_device *device);
+struct dma_chan *dmadev_get_slave_channel(struct dma_device *device,
+ dma_filter_fn fn, void *fn_param);
+#define dma_get_any_slave_channel(device) \
+ dmadev_get_slave_channel(device, NULL, NULL)
#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
#define dma_request_slave_channel_compat(mask, x, y, dev, name) \
__dma_request_slave_channel_compat(&(mask), x, y, dev, name)