From: Haavard Skinnemoen Date: Tue, 8 Jul 2008 18:58:05 +0000 (-0700) Subject: dmaengine: Couple DMA channels to their physical DMA device X-Git-Tag: upstream/snapshot3+hdmi~24135^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1099dc79245719c046e632212ec09d6ec1154ef5;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Dan Williams --- diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 97b329e..99c22b4 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -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);