Skip to content
Commit 8ad342a8 authored by Logan Gunthorpe's avatar Logan Gunthorpe Committed by Vinod Koul
Browse files

dmaengine: Add reference counting to dma_device struct



Adding a reference count helps drivers to properly implement the unbind
while in use case.

References are taken and put every time a channel is allocated or freed.

Once the final reference is put, the device is removed from the
dma_device_list and a release callback function is called to signal
the driver to free the memory.

Signed-off-by: default avatarLogan Gunthorpe <logang@deltatee.com>
Link: https://lore.kernel.org/r/20191216190120.21374-5-logang@deltatee.com
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 11a0fd2b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment