From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752555AbbHUIYa (ORCPT ); Fri, 21 Aug 2015 04:24:30 -0400 Received: from mga01.intel.com ([192.55.52.88]:7722 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751831AbbHUIY1 (ORCPT ); Fri, 21 Aug 2015 04:24:27 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,720,1432623600"; d="scan'208";a="772983450" Date: Fri, 21 Aug 2015 13:56:36 +0530 From: Vinod Koul To: Kuninori Morimoto Cc: Dan Williams , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: CONFIG_OF vs DMA_OF Message-ID: <20150821082636.GK13546@localhost> References: <87wpwpurzk.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wpwpurzk.wl%kuninori.morimoto.gx@renesas.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 21, 2015 at 05:35:58AM +0000, Kuninori Morimoto wrote: > > Hi Vinod > > ${LINUX}/drivers/dma/of-dma.c will be compiled if .config has DMA_OF > > obj-$(CONFIG_DMA_OF) += of-dma.o > > But, ${LINUX}/include/linux/of_dma.h is based on CONFIG_OF Intially it was OF only and then DMA_OF was added. I think we missed it during the move, so yes your below patch makes sense Can you please send as formal patch for me to apply -- ~Vinod > > #ifdef CONFIG_OF > extern int of_dma_controller_register(struct device_node *np, > ... > #else > static inline int of_dma_controller_register(struct device_node *np, > ... > #endif > > I have issue if .config has CONFIG_OF but not have DMA_OF. > Is this correct patch ? > > --------------------------------- > diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h > index 98ba752..9440622 100644 > --- a/include/linux/of_dma.h > +++ b/include/linux/of_dma.h > @@ -34,7 +34,7 @@ struct of_dma_filter_info { > dma_filter_fn filter_fn; > }; > > -#ifdef CONFIG_OF > +#ifdef DMA_OF > extern int of_dma_controller_register(struct device_node *np, > struct dma_chan *(*of_dma_xlate) > (struct of_phandle_args *, struct of_dma *), > --------------------------------- > > > Best regards > --- > Kuninori Morimoto -- -- ~Vinod