Skip to content

Commit 4e82f5d

Browse files
andy-shevVinod Koul
authored andcommitted
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>
1 parent 1b2e98b commit 4e82f5d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎drivers/dma/dmaengine.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
#include <linux/rculist.h>
6363
#include <linux/idr.h>
6464
#include <linux/slab.h>
65+
#include <linux/acpi.h>
66+
#include <linux/acpi_dma.h>
6567
#include <linux/of_dma.h>
6668

6769
static DEFINE_MUTEX(dma_list_mutex);
@@ -564,6 +566,10 @@ struct dma_chan *dma_request_slave_channel(struct device *dev, char *name)
564566
if (dev->of_node)
565567
return of_dma_request_slave_channel(dev->of_node, name);
566568

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+
567573
return NULL;
568574
}
569575
EXPORT_SYMBOL_GPL(dma_request_slave_channel);

0 commit comments

Comments
 (0)