mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dmaengine: Couple DMA channels to their physical DMA device
@ 2008-06-25 12:08 Haavard Skinnemoen
  2008-06-25 18:11 ` Dan Williams
  0 siblings, 1 reply; 2+ messages in thread
From: Haavard Skinnemoen @ 2008-06-25 12:08 UTC (permalink / raw)
  To: Dan Williams; +Cc: Greg KH, linux-kernel, Haavard Skinnemoen

From: Haavard Skinnemoen <hskinnemoen@atmel.com>

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>
---
 drivers/dma/dmaengine.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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);
 
-- 
1.5.5.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] dmaengine: Couple DMA channels to their physical DMA device
  2008-06-25 12:08 [PATCH] dmaengine: Couple DMA channels to their physical DMA device Haavard Skinnemoen
@ 2008-06-25 18:11 ` Dan Williams
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2008-06-25 18:11 UTC (permalink / raw)
  To: Haavard Skinnemoen; +Cc: Greg KH, linux-kernel, Haavard Skinnemoen

On Wed, Jun 25, 2008 at 5:08 AM, Haavard Skinnemoen
<haavard.skinnemoen@atmel.com> wrote:
> From: Haavard Skinnemoen <hskinnemoen@atmel.com>
>
> 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>
> ---

Thanks, applied to async_tx/next

--
Dan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-25 18:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-25 12:08 [PATCH] dmaengine: Couple DMA channels to their physical DMA device Haavard Skinnemoen
2008-06-25 18:11 ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome