aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dmaengine.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-04-09 07:05:44 -0400
committerVinod Koul <vinod.koul@intel.com>2013-04-15 12:34:10 -0400
commit4e82f5ddd1e46fadc3a3c5aafdaec2d1416de9fe (patch)
treefe0857f3c09d919d7acc7044d518ec5d3942aca8 /drivers/dma/dmaengine.c
parent1b2e98bc1e35ebe1f65c3db62c8317096ad7f2c8 (diff)
dmaengine: call acpi_dma_request_slave_channel as well
The slave device could be enumerated by ACPI. In that case the dma_request_slave_channel should use the acpi_dma_request_slave_channel() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/dmaengine.c')
-rw-r--r--drivers/dma/dmaengine.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index d07ef7dc04ec..1b2df59d1d65 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -62,6 +62,8 @@
62#include <linux/rculist.h> 62#include <linux/rculist.h>
63#include <linux/idr.h> 63#include <linux/idr.h>
64#include <linux/slab.h> 64#include <linux/slab.h>
65#include <linux/acpi.h>
66#include <linux/acpi_dma.h>
65#include <linux/of_dma.h> 67#include <linux/of_dma.h>
66 68
67static DEFINE_MUTEX(dma_list_mutex); 69static DEFINE_MUTEX(dma_list_mutex);
@@ -564,6 +566,10 @@ struct dma_chan *dma_request_slave_channel(struct device *dev, char *name)
564 if (dev->of_node) 566 if (dev->of_node)
565 return of_dma_request_slave_channel(dev->of_node, name); 567 return of_dma_request_slave_channel(dev->of_node, name);
566 568
569 /* If device was enumerated by ACPI get slave info from here */
570 if (ACPI_HANDLE(dev))
571 return acpi_dma_request_slave_chan_by_name(dev, name);
572
567 return NULL; 573 return NULL;
568} 574}
569EXPORT_SYMBOL_GPL(dma_request_slave_channel); 575EXPORT_SYMBOL_GPL(dma_request_slave_channel);