diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-18 12:17:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-18 12:17:36 -0700 |
commit | 1b647a166f07dcf08709c8606470f4b17a4aa11d (patch) | |
tree | f0e617065483067cb1797cb5b682a29b405596cc | |
parent | f4566ed08d34ba299412d0bb1a6909ec9af0ed35 (diff) | |
parent | 05aa1a77dcf1b9f9c4fedf09a0a53e15d6b21738 (diff) |
Merge tag 'dmaengine-fix-4.2-rc8' of git://git.infradead.org/users/vkoul/slave-dma
Pull dmaengine fix from Vinod Koul:
"We recently found issue with dma_request_slave_channel() API causing
privatecnt value to go bad. This is fixed by balancing the privatecnt"
* tag 'dmaengine-fix-4.2-rc8' of git://git.infradead.org/users/vkoul/slave-dma:
dmaengine: fix balance of privatecnt inc/dec operations
-rw-r--r-- | drivers/dma/dmaengine.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 4a4cce15f25d..3ff284c8e3d5 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -689,6 +689,10 @@ struct dma_chan *dma_request_slave_channel(struct device *dev, struct dma_chan *ch = dma_request_slave_channel_reason(dev, name); if (IS_ERR(ch)) return NULL; + + dma_cap_set(DMA_PRIVATE, ch->device->cap_mask); + ch->device->privatecnt++; + return ch; } EXPORT_SYMBOL_GPL(dma_request_slave_channel); |