Skip to content

Commit

Permalink
dmaengine: Couple DMA channels to their physical DMA device
Browse files Browse the repository at this point in the history
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: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Haavard Skinnemoen authored and Dan Williams committed Jul 8, 2008
1 parent 65bc3ff commit 1099dc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/dmaengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ int dma_async_device_register(struct dma_device *device)

chan->chan_id = chancnt++;
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",
device->dev_id, chan->chan_id);

Expand Down

0 comments on commit 1099dc7

Please sign in to comment.