diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-07-08 14:58:58 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2008-07-08 14:58:58 -0400 |
commit | 848c536a37b8db4e461f14ca15fe29850151c822 (patch) | |
tree | f4a88e92e31de28511e3a3de99200a77d2613dae /include/linux/dmaengine.h | |
parent | 4a776f0aa922a552460192c07b56f4fe9cd82632 (diff) |
dmaengine: Add dma_client parameter to device_alloc_chan_resources
A DMA controller capable of doing slave transfers may need to know a
few things about the slave when preparing the channel. We don't want
to add this information to struct dma_channel since the channel hasn't
yet been bound to a client at this point.
Instead, pass a reference to the client requesting the channel to the
driver's device_alloc_chan_resources hook so that it can pick the
necessary information from the dma_client struct by itself.
[dan.j.williams@intel.com: fixed up fsldma and mv_xor]
Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r-- | include/linux/dmaengine.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 6432b8343220..ba89b0f5056e 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -281,7 +281,8 @@ struct dma_device { | |||
281 | int dev_id; | 281 | int dev_id; |
282 | struct device *dev; | 282 | struct device *dev; |
283 | 283 | ||
284 | int (*device_alloc_chan_resources)(struct dma_chan *chan); | 284 | int (*device_alloc_chan_resources)(struct dma_chan *chan, |
285 | struct dma_client *client); | ||
285 | void (*device_free_chan_resources)(struct dma_chan *chan); | 286 | void (*device_free_chan_resources)(struct dma_chan *chan); |
286 | 287 | ||
287 | struct dma_async_tx_descriptor *(*device_prep_dma_memcpy)( | 288 | struct dma_async_tx_descriptor *(*device_prep_dma_memcpy)( |