dmaengine: rcar-dmac: implement device_synchronize()
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Mon, 15 May 2017 23:09:16 +0000 (01:09 +0200)
committerVinod Koul <vinod.koul@intel.com>
Fri, 19 May 2017 09:25:23 +0000 (14:55 +0530)
commit30c45005a46bf55ba52086da5e090ec5a2f1c949
treeb816d40c7ed9baa351bcca0b50d48c22f3b6066f
parent427d5ecd270bad5b9ba15a42f0414accdfa4e2f8
dmaengine: rcar-dmac: implement device_synchronize()

Implement the device_synchronize() callback which wait until a dma
channel is stopped to provide a synchronization point.

This protects the driver from multiple race conditions when terminating
and freeing resources. E.g. the completion callback still running after
device_terminate_all() has completed.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/sh/rcar-dmac.c