diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-08-29 22:12:39 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-08-29 22:12:39 -0400 |
commit | 507fbec4cff442ebce6706db34603bfb9cc3b5a9 (patch) | |
tree | 781901167ab7d2ed2f064d9a0e6faa2e87148165 /drivers/dma/iop-adma.c | |
parent | cb3c82992f62f838e6476a0bff12909158007fc6 (diff) |
iop-adma: cleanup iop_adma_run_tx_complete_actions
Replace 'desc->async_tx.' with 'tx->'
[ Impact: pure cleanup ]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/iop-adma.c')
-rw-r--r-- | drivers/dma/iop-adma.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 4496bc606662..ce45f3fb0343 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c | |||
@@ -61,17 +61,18 @@ static dma_cookie_t | |||
61 | iop_adma_run_tx_complete_actions(struct iop_adma_desc_slot *desc, | 61 | iop_adma_run_tx_complete_actions(struct iop_adma_desc_slot *desc, |
62 | struct iop_adma_chan *iop_chan, dma_cookie_t cookie) | 62 | struct iop_adma_chan *iop_chan, dma_cookie_t cookie) |
63 | { | 63 | { |
64 | BUG_ON(desc->async_tx.cookie < 0); | 64 | struct dma_async_tx_descriptor *tx = &desc->async_tx; |
65 | if (desc->async_tx.cookie > 0) { | 65 | |
66 | cookie = desc->async_tx.cookie; | 66 | BUG_ON(tx->cookie < 0); |
67 | desc->async_tx.cookie = 0; | 67 | if (tx->cookie > 0) { |
68 | cookie = tx->cookie; | ||
69 | tx->cookie = 0; | ||
68 | 70 | ||
69 | /* call the callback (must not sleep or submit new | 71 | /* call the callback (must not sleep or submit new |
70 | * operations to this channel) | 72 | * operations to this channel) |
71 | */ | 73 | */ |
72 | if (desc->async_tx.callback) | 74 | if (tx->callback) |
73 | desc->async_tx.callback( | 75 | tx->callback(tx->callback_param); |
74 | desc->async_tx.callback_param); | ||
75 | 76 | ||
76 | /* unmap dma addresses | 77 | /* unmap dma addresses |
77 | * (unmap_single vs unmap_page?) | 78 | * (unmap_single vs unmap_page?) |
@@ -81,7 +82,7 @@ iop_adma_run_tx_complete_actions(struct iop_adma_desc_slot *desc, | |||
81 | struct device *dev = | 82 | struct device *dev = |
82 | &iop_chan->device->pdev->dev; | 83 | &iop_chan->device->pdev->dev; |
83 | u32 len = unmap->unmap_len; | 84 | u32 len = unmap->unmap_len; |
84 | enum dma_ctrl_flags flags = desc->async_tx.flags; | 85 | enum dma_ctrl_flags flags = tx->flags; |
85 | u32 src_cnt; | 86 | u32 src_cnt; |
86 | dma_addr_t addr; | 87 | dma_addr_t addr; |
87 | dma_addr_t dest; | 88 | dma_addr_t dest; |
@@ -115,7 +116,7 @@ iop_adma_run_tx_complete_actions(struct iop_adma_desc_slot *desc, | |||
115 | } | 116 | } |
116 | 117 | ||
117 | /* run dependent operations */ | 118 | /* run dependent operations */ |
118 | dma_run_dependencies(&desc->async_tx); | 119 | dma_run_dependencies(tx); |
119 | 120 | ||
120 | return cookie; | 121 | return cookie; |
121 | } | 122 | } |