Commit 1099dc79 authored by Haavard Skinnemoen's avatar Haavard Skinnemoen Committed by Dan Williams

dmaengine: Couple DMA channels to their physical DMA device

Set the 'parent' field of channel class devices to point to the
physical DMA device initialized by the DMA engine driver.

This allows drivers to use chan->dev.parent for syncing DMA buffers
and adds a 'device' symlink to the real device in
/sys/class/dma/dmaXchanY.
Signed-off-by: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 65bc3ffe
...@@ -378,7 +378,7 @@ int dma_async_device_register(struct dma_device *device) ...@@ -378,7 +378,7 @@ int dma_async_device_register(struct dma_device *device)
chan->chan_id = chancnt++; chan->chan_id = chancnt++;
chan->dev.class = &dma_devclass; chan->dev.class = &dma_devclass;
chan->dev.parent = NULL; chan->dev.parent = device->dev;
snprintf(chan->dev.bus_id, BUS_ID_SIZE, "dma%dchan%d", snprintf(chan->dev.bus_id, BUS_ID_SIZE, "dma%dchan%d",
device->dev_id, chan->chan_id); device->dev_id, chan->chan_id);
......
Markdown is supported
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