From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Ujfalusi Subject: Re: [RFC v02 03/15] dmaengine: core: Introduce new, universal API to request a channel Date: Tue, 1 Dec 2015 11:56:42 +0200 Message-ID: <565D6EDA.4070002@ti.com> References: <1448891145-10766-1-git-send-email-peter.ujfalusi@ti.com> <1448891145-10766-4-git-send-email-peter.ujfalusi@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE 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 To: Andy Shevchenko Return-path: In-Reply-To: Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-spi.vger.kernel.org On 11/30/2015 04:51 PM, Andy Shevchenko wrote: >> +struct dma_chan *dma_request_chan(struct device *dev, const char *n= ame) >> +{ >> + struct dma_device *device, *_d; >> + struct dma_chan *chan =3D NULL; >> + >> + /* If device-tree is present get slave info from here */ >> + if (dev->of_node) >> + chan =3D 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) >=20 > 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 =3D acpi_dma_request_slave_chan_by_name(dev, na= me); >> + >> + if (chan) >> + return chan; >> + --=20 P=C3=A9ter