dmaengine: Add privatecnt to revert DMA_PRIVATE property
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Fri, 6 Mar 2009 11:07:14 +0000 (20:07 +0900)
committerDan Williams <dan.j.williams@intel.com>
Thu, 26 Mar 2009 16:48:09 +0000 (09:48 -0700)
commit0f571515c332e00b3515dbe0859ceaa30ab66e00
tree6d67c555714264dda749e387cee6738f770abc5d
parente44e0aa3cfa97cddff01704751a4b25151830c72
dmaengine: Add privatecnt to revert DMA_PRIVATE property

Currently dma_request_channel() set DMA_PRIVATE capability but never
clear it.  So if a public channel was once grabbed by
dma_request_channel(), the device stay PRIVATE forever.  Add
privatecnt member to dma_device to correctly revert it.

[lg@denx.de: fix bad usage of 'chan' in dma_async_device_register]
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/dmaengine.c
include/linux/dmaengine.h