Skip to content

Commit

Permalink
dmaengine: call acpi_dma_request_slave_channel as well
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Vinod Koul committed Apr 15, 2013
1 parent 1b2e98b commit 4e82f5d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/dma/dmaengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
#include <linux/rculist.h>
#include <linux/idr.h>
#include <linux/slab.h>
#include <linux/acpi.h>
#include <linux/acpi_dma.h>
#include <linux/of_dma.h>

static DEFINE_MUTEX(dma_list_mutex);
Expand Down Expand Up @@ -564,6 +566,10 @@ struct dma_chan *dma_request_slave_channel(struct device *dev, char *name)
if (dev->of_node)
return of_dma_request_slave_channel(dev->of_node, name);

/* If device was enumerated by ACPI get slave info from here */
if (ACPI_HANDLE(dev))
return acpi_dma_request_slave_chan_by_name(dev, name);

return NULL;
}
EXPORT_SYMBOL_GPL(dma_request_slave_channel);
Expand Down

0 comments on commit 4e82f5d

Please sign in to comment.