diff mbox

[01/24,v2] dmaengine: export symbol of of_dma_request_slave_channel()

Message ID 87egpkop98.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State Accepted
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Kuninori Morimoto Feb. 20, 2015, 10:22 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current DMAEngine implementation of DT bindings can't support
DT subnode. This patch export symbols of of_dma_request_slave_channel()
for subnode DMA DT bingings.

ex)

rcar_sound: rcar_sound@ec500000 {
	...
	rcar_sound,dvc {
		dvc0: dvc@0 {
			dmas = <&audma0 0xbc>;
			dma-names = "tx";
		};
		dvc1: dvc@1 {
			dmas = <&audma0 0xbe>;
			dma-names = "tx";
		};
	};
	...
};

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2

 - new patch

 drivers/dma/of-dma.c   |    1 +
 include/linux/of_dma.h |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Geert Uytterhoeven Feb. 23, 2015, 11:22 a.m. UTC | #1
Hi Morimoto-san,

On Fri, Feb 20, 2015 at 11:22 AM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> --- a/include/linux/of_dma.h
> +++ b/include/linux/of_dma.h
> @@ -37,8 +37,8 @@ extern int of_dma_controller_register(struct device_node *np,
>                 (struct of_phandle_args *, struct of_dma *),
>                 void *data);
>  extern void of_dma_controller_free(struct device_node *np);
> -extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
> -                                                    const char *name);
> +struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
> +                                             const char *name);

Why have you dropped the "extern" keyword? Checkpach?
All prototypes in the neighborhood have "extern" keywords, so I think it's
better to keep it for consistency.

>  extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
>                 struct of_dma *ofdma);
>  extern struct dma_chan *of_dma_xlate_by_chan_id(struct of_phandle_args *dma_spec,
Kuninori Morimoto Feb. 24, 2015, 12:40 a.m. UTC | #2
Hi Geert, Vinod

> > --- a/include/linux/of_dma.h
> > +++ b/include/linux/of_dma.h
> > @@ -37,8 +37,8 @@ extern int of_dma_controller_register(struct device_node *np,
> >                 (struct of_phandle_args *, struct of_dma *),
> >                 void *data);
> >  extern void of_dma_controller_free(struct device_node *np);
> > -extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
> > -                                                    const char *name);
> > +struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
> > +                                             const char *name);
> 
> Why have you dropped the "extern" keyword? Checkpach?
> All prototypes in the neighborhood have "extern" keywords, so I think it's
> better to keep it for consistency.

OK, I can fix it.
But, this is very large patchset (24 patches !).
I don't want to send all patches if possible.
I will send only [01/24 v3] now.
Please let me know if it is not OK.

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c
index ca31f1b..cbd4a8a 100644
--- a/drivers/dma/of-dma.c
+++ b/drivers/dma/of-dma.c
@@ -194,6 +194,7 @@  struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
 
 	return ERR_PTR(ret_no_channel);
 }
+EXPORT_SYMBOL_GPL(of_dma_request_slave_channel);
 
 /**
  * of_dma_simple_xlate - Simple DMA engine translation function
diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h
index 56bc026..687a0ac 100644
--- a/include/linux/of_dma.h
+++ b/include/linux/of_dma.h
@@ -37,8 +37,8 @@  extern int of_dma_controller_register(struct device_node *np,
 		(struct of_phandle_args *, struct of_dma *),
 		void *data);
 extern void of_dma_controller_free(struct device_node *np);
-extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
-						     const char *name);
+struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
+					      const char *name);
 extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
 		struct of_dma *ofdma);
 extern struct dma_chan *of_dma_xlate_by_chan_id(struct of_phandle_args *dma_spec,