dmaengine: fix balance of privatecnt
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 24 Sep 2015 09:03:35 +0000 (12:03 +0300)
committerVinod Koul <vinod.koul@intel.com>
Wed, 30 Sep 2015 08:00:08 +0000 (13:30 +0530)
commit214fc4e423ff38b41b60db2209cf49b4e9a7209b
treea66ae822330d8ee43275299d6669552bdfe6e48a
parent40482e64b0b84388561b00b880eeca7000f72d38
dmaengine: fix balance of privatecnt

dma_release_channel() decrements privatecnt counter and almost all dma_get*
function increments it with the exception of dma_get_slave_channel().
In most cases this does not cause issue since normally the channel is not
requested and released, but if a driver requests DMA channel via
dma_get_slave_channel() and releases the channel the privatecnt will be
unbalanced and this will prevent for example getting channel for memcpy.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dmaengine.c