]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: track the number of clients using a channel
authorDan Williams <dan.j.williams@intel.com>
Tue, 8 Jul 2008 18:58:21 +0000 (11:58 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 8 Jul 2008 18:58:21 +0000 (11:58 -0700)
commitcf5d9a808fde6d44f044d61eb043303c3b0cfa85
treeb526b348ed1b64884bf672924540bb5dc29cb211
parentbe64c24def3341e8988746967509b1f46478741a
dmaengine: track the number of clients using a channel

Haavard's dma-slave interface would like to test for exclusive access to a
channel.  The standard channel refcounting is not sufficient in that it
tracks more than just client references, it is also inaccurate as reference
counts are percpu until the channel is removed.

This change also enables a future fix to deallocate resources when a client
declines to use a capable channel.

Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/dmaengine.c
include/linux/dmaengine.h