Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131495
b: refs/heads/master
c: 287d859
h: refs/heads/master
i:
  131493: 07c0781
  131491: 21c1a60
  131487: 9cbc6ee
v: v3
  • Loading branch information
Dan Williams authored and Linus Torvalds committed Feb 18, 2009
1 parent 4b8c46d commit 0b62e61
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9ccf3b5e8409927835c4d38cb2f380c9e4349e76
refs/heads/master: 287d859222e0adbc67666a6154aaf42d7d5bbb54
2 changes: 2 additions & 0 deletions trunk/drivers/dma/dmaengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v
dma_chan_name(chan), err);
else
break;
chan->private = NULL;
chan = NULL;
}
}
Expand All @@ -536,6 +537,7 @@ void dma_release_channel(struct dma_chan *chan)
WARN_ONCE(chan->client_count != 1,
"chan reference count %d != 1\n", chan->client_count);
dma_chan_put(chan);
chan->private = NULL;
mutex_unlock(&dma_list_mutex);
}
EXPORT_SYMBOL_GPL(dma_release_channel);
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/dma/dw_dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
unsigned long flags)
{
struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
struct dw_dma_slave *dws = dwc->dws;
struct dw_dma_slave *dws = chan->private;
struct dw_desc *prev;
struct dw_desc *first;
u32 ctllo;
Expand Down Expand Up @@ -790,7 +790,7 @@ static int dwc_alloc_chan_resources(struct dma_chan *chan)
cfghi = DWC_CFGH_FIFO_MODE;
cfglo = 0;

dws = dwc->dws;
dws = chan->private;
if (dws) {
/*
* We need controller-specific data to set up slave
Expand Down Expand Up @@ -866,7 +866,6 @@ static void dwc_free_chan_resources(struct dma_chan *chan)
spin_lock_bh(&dwc->lock);
list_splice_init(&dwc->free_list, &list);
dwc->descs_allocated = 0;
dwc->dws = NULL;

/* Disable interrupts */
channel_clear_bit(dw, MASK.XFER, dwc->mask);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/dma/dw_dmac_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ struct dw_dma_chan {
struct list_head queue;
struct list_head free_list;

struct dw_dma_slave *dws;

unsigned int descs_allocated;
};

Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/mmc/host/atmel-mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1548,9 +1548,10 @@ static bool filter(struct dma_chan *chan, void *slave)
{
struct dw_dma_slave *dws = slave;

if (dws->dma_dev == chan->device->dev)
if (dws->dma_dev == chan->device->dev) {
chan->private = dws;
return true;
else
} else
return false;
}
#endif
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/dmaengine.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ struct dma_chan_percpu {
* @local: per-cpu pointer to a struct dma_chan_percpu
* @client-count: how many clients are using this channel
* @table_count: number of appearances in the mem-to-mem allocation table
* @private: private data for certain client-channel associations
*/
struct dma_chan {
struct dma_device *device;
Expand All @@ -134,6 +135,7 @@ struct dma_chan {
struct dma_chan_percpu *local;
int client_count;
int table_count;
void *private;
};

/**
Expand Down

0 comments on commit 0b62e61

Please sign in to comment.