aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@linux.intel.com>2012-09-25 09:57:36 +0530
committerGuodong Xu <guodong.xu@linaro.org>2013-02-21 16:12:23 +0800
commit70f858dc6ded6f268567fb35ef7bbbf70c47f0d5 (patch)
tree3e2092fba1f06694e605e7bfec6afdcf8d42d081
parent144590cee4ec188ed2f6f2356da0f4c5d3c0ca6d (diff)
of: dma- fix build break for !CONFIG_OF
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
-rw-r--r--include/linux/of_dma.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h
index 337823dc6b90..67158ddd1f3e 100644
--- a/include/linux/of_dma.h
+++ b/include/linux/of_dma.h
@@ -32,6 +32,7 @@ struct of_dma_filter_info {
dma_filter_fn filter_fn;
};
+#ifdef CONFIG_OF
extern int of_dma_controller_register(struct device_node *np,
struct dma_chan *(*of_dma_xlate)
(struct of_phandle_args *, struct of_dma *),
@@ -41,5 +42,31 @@ extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
char *name);
extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
struct of_dma *ofdma);
+#else
+static int of_dma_controller_register(struct device_node *np,
+ struct dma_chan *(*of_dma_xlate)
+ (struct of_phandle_args *, struct of_dma *),
+ void *data)
+{
+ return -ENODEV;
+}
+
+static void of_dma_controller_free(struct device_node *np)
+{
+}
+
+static struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
+ char *name)
+{
+ return NULL;
+}
+
+static struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
+ struct of_dma *ofdma)
+{
+ return NULL;
+}
+
+#endif
#endif /* __LINUX_OF_DMA_H */