diff options
-rw-r--r-- | drivers/of/device.c | 12 | ||||
-rw-r--r-- | drivers/of/platform.c | 5 | ||||
-rw-r--r-- | include/linux/of_device.h | 3 |
3 files changed, 15 insertions, 5 deletions
diff --git a/drivers/of/device.c b/drivers/of/device.c index b1e6bebda3f3..0d378c03e1a4 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c | |||
@@ -151,6 +151,18 @@ void of_dma_configure(struct device *dev, struct device_node *np) | |||
151 | } | 151 | } |
152 | EXPORT_SYMBOL_GPL(of_dma_configure); | 152 | EXPORT_SYMBOL_GPL(of_dma_configure); |
153 | 153 | ||
154 | /** | ||
155 | * of_dma_deconfigure - Clean up DMA configuration | ||
156 | * @dev: Device for which to clean up DMA configuration | ||
157 | * | ||
158 | * Clean up all configuration performed by of_dma_configure_ops() and free all | ||
159 | * resources that have been allocated. | ||
160 | */ | ||
161 | void of_dma_deconfigure(struct device *dev) | ||
162 | { | ||
163 | arch_teardown_dma_ops(dev); | ||
164 | } | ||
165 | |||
154 | int of_device_register(struct platform_device *pdev) | 166 | int of_device_register(struct platform_device *pdev) |
155 | { | 167 | { |
156 | device_initialize(&pdev->dev); | 168 | device_initialize(&pdev->dev); |
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 5dfcc967dd05..5344db50aa65 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
@@ -158,11 +158,6 @@ struct platform_device *of_device_alloc(struct device_node *np, | |||
158 | } | 158 | } |
159 | EXPORT_SYMBOL(of_device_alloc); | 159 | EXPORT_SYMBOL(of_device_alloc); |
160 | 160 | ||
161 | static void of_dma_deconfigure(struct device *dev) | ||
162 | { | ||
163 | arch_teardown_dma_ops(dev); | ||
164 | } | ||
165 | |||
166 | /** | 161 | /** |
167 | * of_platform_device_create_pdata - Alloc, initialize and register an of_device | 162 | * of_platform_device_create_pdata - Alloc, initialize and register an of_device |
168 | * @np: pointer to node to create device for | 163 | * @np: pointer to node to create device for |
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index c12dace043f3..af984551cc2b 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h | |||
@@ -56,6 +56,7 @@ static inline struct device_node *of_cpu_device_node_get(int cpu) | |||
56 | } | 56 | } |
57 | 57 | ||
58 | void of_dma_configure(struct device *dev, struct device_node *np); | 58 | void of_dma_configure(struct device *dev, struct device_node *np); |
59 | void of_dma_deconfigure(struct device *dev); | ||
59 | #else /* CONFIG_OF */ | 60 | #else /* CONFIG_OF */ |
60 | 61 | ||
61 | static inline int of_driver_match_device(struct device *dev, | 62 | static inline int of_driver_match_device(struct device *dev, |
@@ -105,6 +106,8 @@ static inline struct device_node *of_cpu_device_node_get(int cpu) | |||
105 | } | 106 | } |
106 | static inline void of_dma_configure(struct device *dev, struct device_node *np) | 107 | static inline void of_dma_configure(struct device *dev, struct device_node *np) |
107 | {} | 108 | {} |
109 | static inline void of_dma_deconfigure(struct device *dev) | ||
110 | {} | ||
108 | #endif /* CONFIG_OF */ | 111 | #endif /* CONFIG_OF */ |
109 | 112 | ||
110 | #endif /* _LINUX_OF_DEVICE_H */ | 113 | #endif /* _LINUX_OF_DEVICE_H */ |