diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-03-25 12:13:24 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-03-25 12:13:24 -0400 |
commit | ccccce229c633a92c42cd1a40c0738d7b0d12644 (patch) | |
tree | a954537ae73f2e03c4431b244796cdc255af7a10 /drivers | |
parent | 8d47bae004f062630f69f7f83d098424252e232d (diff) |
dmaengine: initialize tx_list in dma_async_tx_descriptor_init
Centralize this common initialization (and one case where ipu_idmac is
duplicating ->chan initialization).
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/dmaengine.c | 1 | ||||
-rw-r--r-- | drivers/dma/dw_dmac.c | 1 | ||||
-rw-r--r-- | drivers/dma/fsldma.c | 1 | ||||
-rw-r--r-- | drivers/dma/ioat_dma.c | 1 | ||||
-rw-r--r-- | drivers/dma/iop-adma.c | 1 | ||||
-rw-r--r-- | drivers/dma/ipu/ipu_idmac.c | 2 | ||||
-rw-r--r-- | drivers/dma/mv_xor.c | 1 |
7 files changed, 1 insertions, 7 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 49243d14b894..a41d1ea10fa3 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -920,6 +920,7 @@ void dma_async_tx_descriptor_init(struct dma_async_tx_descriptor *tx, | |||
920 | { | 920 | { |
921 | tx->chan = chan; | 921 | tx->chan = chan; |
922 | spin_lock_init(&tx->lock); | 922 | spin_lock_init(&tx->lock); |
923 | INIT_LIST_HEAD(&tx->tx_list); | ||
923 | } | 924 | } |
924 | EXPORT_SYMBOL(dma_async_tx_descriptor_init); | 925 | EXPORT_SYMBOL(dma_async_tx_descriptor_init); |
925 | 926 | ||
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index a97c07eef7ec..862fc9ce9d86 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c | |||
@@ -826,7 +826,6 @@ static int dwc_alloc_chan_resources(struct dma_chan *chan) | |||
826 | dma_async_tx_descriptor_init(&desc->txd, chan); | 826 | dma_async_tx_descriptor_init(&desc->txd, chan); |
827 | desc->txd.tx_submit = dwc_tx_submit; | 827 | desc->txd.tx_submit = dwc_tx_submit; |
828 | desc->txd.flags = DMA_CTRL_ACK; | 828 | desc->txd.flags = DMA_CTRL_ACK; |
829 | INIT_LIST_HEAD(&desc->txd.tx_list); | ||
830 | desc->txd.phys = dma_map_single(chan2parent(chan), &desc->lli, | 829 | desc->txd.phys = dma_map_single(chan2parent(chan), &desc->lli, |
831 | sizeof(desc->lli), DMA_TO_DEVICE); | 830 | sizeof(desc->lli), DMA_TO_DEVICE); |
832 | dwc_desc_put(dwc, desc); | 831 | dwc_desc_put(dwc, desc); |
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 86d6da47f558..da8a8ed9e411 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
@@ -354,7 +354,6 @@ static struct fsl_desc_sw *fsl_dma_alloc_descriptor( | |||
354 | dma_async_tx_descriptor_init(&desc_sw->async_tx, | 354 | dma_async_tx_descriptor_init(&desc_sw->async_tx, |
355 | &fsl_chan->common); | 355 | &fsl_chan->common); |
356 | desc_sw->async_tx.tx_submit = fsl_dma_tx_submit; | 356 | desc_sw->async_tx.tx_submit = fsl_dma_tx_submit; |
357 | INIT_LIST_HEAD(&desc_sw->async_tx.tx_list); | ||
358 | desc_sw->async_tx.phys = pdesc; | 357 | desc_sw->async_tx.phys = pdesc; |
359 | } | 358 | } |
360 | 359 | ||
diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c index 5905cd36bcd2..e4fc33c1c32f 100644 --- a/drivers/dma/ioat_dma.c +++ b/drivers/dma/ioat_dma.c | |||
@@ -693,7 +693,6 @@ static struct ioat_desc_sw *ioat_dma_alloc_descriptor( | |||
693 | desc_sw->async_tx.tx_submit = ioat2_tx_submit; | 693 | desc_sw->async_tx.tx_submit = ioat2_tx_submit; |
694 | break; | 694 | break; |
695 | } | 695 | } |
696 | INIT_LIST_HEAD(&desc_sw->async_tx.tx_list); | ||
697 | 696 | ||
698 | desc_sw->hw = desc; | 697 | desc_sw->hw = desc; |
699 | desc_sw->async_tx.phys = phys; | 698 | desc_sw->async_tx.phys = phys; |
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 16adbe61cfb2..2f052265122f 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c | |||
@@ -498,7 +498,6 @@ static int iop_adma_alloc_chan_resources(struct dma_chan *chan) | |||
498 | slot->async_tx.tx_submit = iop_adma_tx_submit; | 498 | slot->async_tx.tx_submit = iop_adma_tx_submit; |
499 | INIT_LIST_HEAD(&slot->chain_node); | 499 | INIT_LIST_HEAD(&slot->chain_node); |
500 | INIT_LIST_HEAD(&slot->slot_node); | 500 | INIT_LIST_HEAD(&slot->slot_node); |
501 | INIT_LIST_HEAD(&slot->async_tx.tx_list); | ||
502 | hw_desc = (char *) iop_chan->device->dma_desc_pool; | 501 | hw_desc = (char *) iop_chan->device->dma_desc_pool; |
503 | slot->async_tx.phys = | 502 | slot->async_tx.phys = |
504 | (dma_addr_t) &hw_desc[idx * IOP_ADMA_SLOT_SIZE]; | 503 | (dma_addr_t) &hw_desc[idx * IOP_ADMA_SLOT_SIZE]; |
diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c index 0a525c450f24..7ce0e25266dc 100644 --- a/drivers/dma/ipu/ipu_idmac.c +++ b/drivers/dma/ipu/ipu_idmac.c | |||
@@ -983,8 +983,6 @@ static int idmac_desc_alloc(struct idmac_channel *ichan, int n) | |||
983 | memset(txd, 0, sizeof(*txd)); | 983 | memset(txd, 0, sizeof(*txd)); |
984 | dma_async_tx_descriptor_init(txd, &ichan->dma_chan); | 984 | dma_async_tx_descriptor_init(txd, &ichan->dma_chan); |
985 | txd->tx_submit = idmac_tx_submit; | 985 | txd->tx_submit = idmac_tx_submit; |
986 | txd->chan = &ichan->dma_chan; | ||
987 | INIT_LIST_HEAD(&txd->tx_list); | ||
988 | 986 | ||
989 | list_add(&desc->list, &ichan->free_list); | 987 | list_add(&desc->list, &ichan->free_list); |
990 | 988 | ||
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index cb7f26fb9f18..ddab94f51224 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
@@ -632,7 +632,6 @@ static int mv_xor_alloc_chan_resources(struct dma_chan *chan) | |||
632 | slot->async_tx.tx_submit = mv_xor_tx_submit; | 632 | slot->async_tx.tx_submit = mv_xor_tx_submit; |
633 | INIT_LIST_HEAD(&slot->chain_node); | 633 | INIT_LIST_HEAD(&slot->chain_node); |
634 | INIT_LIST_HEAD(&slot->slot_node); | 634 | INIT_LIST_HEAD(&slot->slot_node); |
635 | INIT_LIST_HEAD(&slot->async_tx.tx_list); | ||
636 | hw_desc = (char *) mv_chan->device->dma_desc_pool; | 635 | hw_desc = (char *) mv_chan->device->dma_desc_pool; |
637 | slot->async_tx.phys = | 636 | slot->async_tx.phys = |
638 | (dma_addr_t) &hw_desc[idx * MV_XOR_SLOT_SIZE]; | 637 | (dma_addr_t) &hw_desc[idx * MV_XOR_SLOT_SIZE]; |