lkml.org 
[lkml]   [2015]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC v02 03/15] dmaengine: core: Introduce new, universal API to request a channel
From
Date
On 11/30/2015 04:51 PM, Andy Shevchenko wrote:
>> +struct dma_chan *dma_request_chan(struct device *dev, const char *name)
>> +{
>> + struct dma_device *device, *_d;
>> + struct dma_chan *chan = NULL;
>> +
>> + /* If device-tree is present get slave info from here */
>> + if (dev->of_node)
>> + chan = of_dma_request_slave_channel(dev->of_node, name);
>> +
>> + /* If device was enumerated by ACPI get slave info from here */
>> + if (ACPI_HANDLE(dev) && !chan)
>
> The preferable way is to use
> has_acpi_companion() instead of ACPI_HANDLE().

I have done this part based on the dma_request_slave_channel_reason().
Will switch to use the has_acpi_companion() for the next RFC.

>> + chan = acpi_dma_request_slave_chan_by_name(dev, name);
>> +
>> + if (chan)
>> + return chan;
>> +

--
Péter


\
 
 \ /
  Last update: 2015-12-01 11:01    [W:0.299 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site