forked from RobertCNelson/linux-dev
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path0006-of-dma-fix-build-break-for-CONFIG_OF.patch
57 lines (52 loc) · 1.52 KB
/
0006-of-dma-fix-build-break-for-CONFIG_OF.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From 4bbb3b0e0d167995d6f26e012081c029458a91d1 Mon Sep 17 00:00:00 2001
From: Vinod Koul <vinod.koul@linux.intel.com>
Date: Tue, 25 Sep 2012 09:57:36 +0530
Subject: [PATCH 06/35] of: dma- fix build break for !CONFIG_OF
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
---
include/linux/of_dma.h | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h
index 337823d..67158dd 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 */
--
1.7.10.4