From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754797Ab3AKRwi (ORCPT ); Fri, 11 Jan 2013 12:52:38 -0500 Received: from mho-04-ewr.mailhop.org ([204.13.248.74]:12055 "EHLO mho-02-ewr.mailhop.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751775Ab3AKRwg (ORCPT ); Fri, 11 Jan 2013 12:52:36 -0500 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 50.131.214.131 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19DMojpkDKZcbwPFdt7nvVA Date: Fri, 11 Jan 2013 09:52:23 -0800 From: Tony Lindgren To: Matt Porter Cc: Sekhar Nori , Grant Likely , Mark Brown , Benoit Cousson , Russell King , Vinod Koul , Rob Landley , Chris Ball , Devicetree Discuss , Linux OMAP List , Linux ARM Kernel List , Linux DaVinci Kernel List , Linux Kernel Mailing List , Linux Documentation List , Linux MMC List , Linux SPI Devel List , Arnd Bergmann , Dan Williams , Rob Herring Subject: Re: [PATCH v4 07/14] dmaengine: add dma_request_slave_channel_compat() Message-ID: <20130111175223.GF14149@atomide.com> References: <1357883330-5364-1-git-send-email-mporter@ti.com> <1357883330-5364-8-git-send-email-mporter@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1357883330-5364-8-git-send-email-mporter@ti.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Matt Porter [130110 21:47]: > Adds a dma_request_slave_channel_compat() wrapper which accepts > both the arguments from dma_request_channel() and > dma_request_slave_channel(). Based on whether the driver is > instantiated via DT, the appropriate channel request call will be > made. > > This allows for a much cleaner migration of drivers to the > dmaengine DT API as platforms continue to be mixed between those > that boot using DT and those that do not. Cool, looks like the driver changes are quite minimal after this: Acked-by: Tony Lindgren > > Suggested-by: Tony Lindgren > Signed-off-by: Matt Porter > --- > include/linux/dmaengine.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h > index 9fd0c5b..64f9f69 100644 > --- a/include/linux/dmaengine.h > +++ b/include/linux/dmaengine.h > @@ -1047,6 +1047,16 @@ void dma_run_dependencies(struct dma_async_tx_descriptor *tx); > struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); > struct dma_chan *net_dma_find_channel(void); > #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) > +static inline struct dma_chan > +*dma_request_slave_channel_compat(dma_cap_mask_t mask, dma_filter_fn fn, > + void *fn_param, struct device *dev, > + char *name) > +{ > + if (dev->of_node) > + return dma_request_slave_channel(dev, name); > + else > + return dma_request_channel(mask, fn, fn_param); > +} > > /* --- Helper iov-locking functions --- */ > > -- > 1.7.9.5 >