aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2008-07-08 14:58:05 -0400
committerDan Williams <dan.j.williams@intel.com>2008-07-08 14:58:05 -0400
commit1099dc79245719c046e632212ec09d6ec1154ef5 (patch)
treee80912e5d819d131d51b6845d8aff03bd7f2b9f6 /drivers/dma
parent65bc3ffe8c067e387fe5557bc3ea5071071f6af9 (diff)
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: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/dmaengine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 97b329e76798..99c22b42bada 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -378,7 +378,7 @@ int dma_async_device_register(struct dma_device *device)
378 378
379 chan->chan_id = chancnt++; 379 chan->chan_id = chancnt++;
380 chan->dev.class = &dma_devclass; 380 chan->dev.class = &dma_devclass;
381 chan->dev.parent = NULL; 381 chan->dev.parent = device->dev;
382 snprintf(chan->dev.bus_id, BUS_ID_SIZE, "dma%dchan%d", 382 snprintf(chan->dev.bus_id, BUS_ID_SIZE, "dma%dchan%d",
383 device->dev_id, chan->chan_id); 383 device->dev_id, chan->chan_id);
384 384