Re: [PATCH V6 2/2] dmaengine: add helper function to request a slave DMA channel
From: Vinod Koul <hidden>
Date: 2012-09-17 03:33:25
Also in:
linux-arm-kernel, linux-omap
From: Vinod Koul <hidden>
Date: 2012-09-17 03:33:25
Also in:
linux-arm-kernel, linux-omap
On Fri, 2012-09-14 at 17:41 -0500, Jon Hunter wrote:
+/**
+ * dma_request_slave_channel - try to allocate an exclusive slave
channel
+ * @dev: pointer to client device structure
+ * @name: slave channel name
+ */
+struct dma_chan *dma_request_slave_channel(struct device *dev, char *name)
+{
+ /* If device-tree is present get slave info from here */
+ if (dev->of_node)
+ return of_dma_request_slave_channel(dev->of_node, name);
+Shouldn't this be conditionally compiled only when OF is built. I think this might be problematic for systems which doesn't have device tree. Or perhaps you can declare these symbols as dummy in of_dma.h when device tree is not selected.
+ return NULL; +} +EXPORT_SYMBOL_GPL(dma_request_slave_channel);
-- ~Vinod