]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: fix balance of privatecnt inc/dec operations
authorRobert Baldyga <r.baldyga@samsung.com>
Fri, 7 Aug 2015 10:26:47 +0000 (12:26 +0200)
committerVinod Koul <vinod.koul@intel.com>
Mon, 17 Aug 2015 17:17:43 +0000 (22:47 +0530)
commitd530d4d051865d46ed9a7a027d7e740d3ee1b80a
tree4f6401fd10277fc91f45aa7b823f780a8e1c50e5
parent48584aa9632846de1137d6b366bfad1ca473227a
dmaengine: fix balance of privatecnt inc/dec operations

This patch increments privatecnt value and set DMA_PRIVATE in device
caps in dma_request_slave_channel() function. This is needed to keep
privatecnt increment/decrement balance.

As function dma_release_channel() decrements privatecnt counter, we need
to increment it when channel is requested. Otherwise privatecnt drops
into negatives after few dma_release_channel() calls.

Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dmaengine.c