diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2012-03-06 17:34:06 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-03-13 02:06:06 -0400 |
commit | 4d4e58de32a192fea65ab84509d17d199bd291c8 (patch) | |
tree | be35531778c9cc6bee73beb94d07e176a6f3599d /include/linux/dmaengine.h | |
parent | 08714f60b0fc6ea3a060b69b32e77139f14e6045 (diff) |
dmaengine: move last completed cookie into generic dma_chan structure
Every DMA engine implementation declares a last completed dma cookie
in their private dma channel structures. This is pointless, and
forces driver specific code. Move this out into the common dma_chan
structure.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r-- | include/linux/dmaengine.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 7e640bf27d2d..c59c4f0c2cc9 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -258,6 +258,7 @@ struct dma_chan_percpu { | |||
258 | * struct dma_chan - devices supply DMA channels, clients use them | 258 | * struct dma_chan - devices supply DMA channels, clients use them |
259 | * @device: ptr to the dma device who supplies this channel, always !%NULL | 259 | * @device: ptr to the dma device who supplies this channel, always !%NULL |
260 | * @cookie: last cookie value returned to client | 260 | * @cookie: last cookie value returned to client |
261 | * @completed_cookie: last completed cookie for this channel | ||
261 | * @chan_id: channel ID for sysfs | 262 | * @chan_id: channel ID for sysfs |
262 | * @dev: class device for sysfs | 263 | * @dev: class device for sysfs |
263 | * @device_node: used to add this to the device chan list | 264 | * @device_node: used to add this to the device chan list |
@@ -269,6 +270,7 @@ struct dma_chan_percpu { | |||
269 | struct dma_chan { | 270 | struct dma_chan { |
270 | struct dma_device *device; | 271 | struct dma_device *device; |
271 | dma_cookie_t cookie; | 272 | dma_cookie_t cookie; |
273 | dma_cookie_t completed_cookie; | ||
272 | 274 | ||
273 | /* sysfs */ | 275 | /* sysfs */ |
274 | int chan_id; | 276 | int chan_id; |