diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-20 11:40:43 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-20 11:40:43 -0500 |
commit | 3b6f7b9beb553ea71a6d4d76ba82cf32eb6dadd2 (patch) | |
tree | 2cd8a8d61f350aa3b00e6b0afc998544923f183e /drivers/dma | |
parent | 9be1b56a3e718aa998772019c57c398dbb19e258 (diff) | |
parent | 07a66d7c53a538e1a9759954a82bb6c07365eff9 (diff) |
Merge branch 'x86/urgent' into x86/core
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/dmaengine.c | 2 | ||||
-rw-r--r-- | drivers/dma/dw_dmac.c | 5 | ||||
-rw-r--r-- | drivers/dma/dw_dmac_regs.h | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index a58993011edb..280a9d263eb3 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -518,6 +518,7 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v | |||
518 | dma_chan_name(chan), err); | 518 | dma_chan_name(chan), err); |
519 | else | 519 | else |
520 | break; | 520 | break; |
521 | chan->private = NULL; | ||
521 | chan = NULL; | 522 | chan = NULL; |
522 | } | 523 | } |
523 | } | 524 | } |
@@ -536,6 +537,7 @@ void dma_release_channel(struct dma_chan *chan) | |||
536 | WARN_ONCE(chan->client_count != 1, | 537 | WARN_ONCE(chan->client_count != 1, |
537 | "chan reference count %d != 1\n", chan->client_count); | 538 | "chan reference count %d != 1\n", chan->client_count); |
538 | dma_chan_put(chan); | 539 | dma_chan_put(chan); |
540 | chan->private = NULL; | ||
539 | mutex_unlock(&dma_list_mutex); | 541 | mutex_unlock(&dma_list_mutex); |
540 | } | 542 | } |
541 | EXPORT_SYMBOL_GPL(dma_release_channel); | 543 | EXPORT_SYMBOL_GPL(dma_release_channel); |
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index 6b702cc46b3d..a97c07eef7ec 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c | |||
@@ -560,7 +560,7 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | |||
560 | unsigned long flags) | 560 | unsigned long flags) |
561 | { | 561 | { |
562 | struct dw_dma_chan *dwc = to_dw_dma_chan(chan); | 562 | struct dw_dma_chan *dwc = to_dw_dma_chan(chan); |
563 | struct dw_dma_slave *dws = dwc->dws; | 563 | struct dw_dma_slave *dws = chan->private; |
564 | struct dw_desc *prev; | 564 | struct dw_desc *prev; |
565 | struct dw_desc *first; | 565 | struct dw_desc *first; |
566 | u32 ctllo; | 566 | u32 ctllo; |
@@ -790,7 +790,7 @@ static int dwc_alloc_chan_resources(struct dma_chan *chan) | |||
790 | cfghi = DWC_CFGH_FIFO_MODE; | 790 | cfghi = DWC_CFGH_FIFO_MODE; |
791 | cfglo = 0; | 791 | cfglo = 0; |
792 | 792 | ||
793 | dws = dwc->dws; | 793 | dws = chan->private; |
794 | if (dws) { | 794 | if (dws) { |
795 | /* | 795 | /* |
796 | * We need controller-specific data to set up slave | 796 | * We need controller-specific data to set up slave |
@@ -866,7 +866,6 @@ static void dwc_free_chan_resources(struct dma_chan *chan) | |||
866 | spin_lock_bh(&dwc->lock); | 866 | spin_lock_bh(&dwc->lock); |
867 | list_splice_init(&dwc->free_list, &list); | 867 | list_splice_init(&dwc->free_list, &list); |
868 | dwc->descs_allocated = 0; | 868 | dwc->descs_allocated = 0; |
869 | dwc->dws = NULL; | ||
870 | 869 | ||
871 | /* Disable interrupts */ | 870 | /* Disable interrupts */ |
872 | channel_clear_bit(dw, MASK.XFER, dwc->mask); | 871 | channel_clear_bit(dw, MASK.XFER, dwc->mask); |
diff --git a/drivers/dma/dw_dmac_regs.h b/drivers/dma/dw_dmac_regs.h index 00fdd187bb0c..b252b202c5cf 100644 --- a/drivers/dma/dw_dmac_regs.h +++ b/drivers/dma/dw_dmac_regs.h | |||
@@ -139,8 +139,6 @@ struct dw_dma_chan { | |||
139 | struct list_head queue; | 139 | struct list_head queue; |
140 | struct list_head free_list; | 140 | struct list_head free_list; |
141 | 141 | ||
142 | struct dw_dma_slave *dws; | ||
143 | |||
144 | unsigned int descs_allocated; | 142 | unsigned int descs_allocated; |
145 | }; | 143 | }; |
146 | 144 | ||