Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755937AbbLAJ5U (ORCPT ); Tue, 1 Dec 2015 04:57:20 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:57324 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754282AbbLAJ5P (ORCPT ); Tue, 1 Dec 2015 04:57:15 -0500 Subject: Re: [RFC v02 03/15] dmaengine: core: Introduce new, universal API to request a channel To: Andy Shevchenko References: <1448891145-10766-1-git-send-email-peter.ujfalusi@ti.com> <1448891145-10766-4-git-send-email-peter.ujfalusi@ti.com> CC: Vinod Koul , Arnd Bergmann , "linux-kernel@vger.kernel.org" , dmaengine , Linux OMAP Mailing List , linux-arm Mailing List , "linux-mmc@vger.kernel.org" , Sekhar Nori , linux-spi From: Peter Ujfalusi X-Enigmail-Draft-Status: N1110 Message-ID: <565D6EDA.4070002@ti.com> Date: Tue, 1 Dec 2015 11:56:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1125 Lines: 32 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/