]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
of: dma: Make of_dma_deconfigure() public
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 14 May 2015 23:00:05 +0000 (02:00 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Aug 2017 10:51:16 +0000 (12:51 +0200)
As part of moving DMA initializing to probe time the
of_dma_deconfigure() function will need to be called from different
source files. Make it public and move it to drivers/of/device.c where
the of_dma_configure() function is.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/of/device.c
drivers/of/platform.c
include/linux/of_device.h

index 96d6c4525bd9c8445996ec1a5bc5deb2855290c5..74452554f5d73c525e7644e2974d71cf932659c8 100644 (file)
@@ -136,6 +136,18 @@ void of_dma_configure(struct device *dev, struct device_node *np)
 }
 EXPORT_SYMBOL_GPL(of_dma_configure);
 
+/**
+ * of_dma_deconfigure - Clean up DMA configuration
+ * @dev:       Device for which to clean up DMA configuration
+ *
+ * Clean up all configuration performed by of_dma_configure_ops() and free all
+ * resources that have been allocated.
+ */
+void of_dma_deconfigure(struct device *dev)
+{
+       arch_teardown_dma_ops(dev);
+}
+
 int of_device_register(struct platform_device *pdev)
 {
        device_initialize(&pdev->dev);
index af98343614d8eeebeabc1fa0c74337029cd70335..b6fc68c29598883c6b84be9768937ec851957df8 100644 (file)
@@ -150,11 +150,6 @@ struct platform_device *of_device_alloc(struct device_node *np,
 }
 EXPORT_SYMBOL(of_device_alloc);
 
-static void of_dma_deconfigure(struct device *dev)
-{
-       arch_teardown_dma_ops(dev);
-}
-
 /**
  * of_platform_device_create_pdata - Alloc, initialize and register an of_device
  * @np: pointer to node to create device for
index cc7dd687a89dd60699ebe28556138e293bcde9bc..d20a31a4a5857022573986dcc29d495e06d10c68 100644 (file)
@@ -56,6 +56,7 @@ static inline struct device_node *of_cpu_device_node_get(int cpu)
 }
 
 void of_dma_configure(struct device *dev, struct device_node *np);
+void of_dma_deconfigure(struct device *dev);
 #else /* CONFIG_OF */
 
 static inline int of_driver_match_device(struct device *dev,
@@ -100,6 +101,8 @@ static inline struct device_node *of_cpu_device_node_get(int cpu)
 }
 static inline void of_dma_configure(struct device *dev, struct device_node *np)
 {}
+static inline void of_dma_deconfigure(struct device *dev)
+{}
 #endif /* CONFIG_OF */
 
 #endif /* _LINUX_OF_DEVICE_H */