@@ -160,16 +160,6 @@ extern int of_bus_n_addr_cells(struct device_node *np);
extern int of_bus_n_size_cells(struct device_node *np);
struct bus_dma_region;
-#if defined(CONFIG_OF_ADDRESS) && defined(CONFIG_HAS_DMA)
-int of_dma_get_range(struct device_node *np,
- const struct bus_dma_region **map);
-#else
-static inline int of_dma_get_range(struct device_node *np,
- const struct bus_dma_region **map)
-{
- return -ENODEV;
-}
-#endif
void fdt_init_reserved_mem(void);
void fdt_reserved_mem_save_node(unsigned long node, const char *uname,
@@ -154,4 +154,16 @@ static inline const __be32 *of_get_pci_address(struct device_node *dev, int bar_
return __of_get_address(dev, -1, bar_no, size, flags);
}
+struct bus_dma_region;
+#if defined(CONFIG_OF_ADDRESS) && defined(CONFIG_HAS_DMA)
+int of_dma_get_range(struct device_node *np,
+ const struct bus_dma_region **map);
+#else
+static inline int of_dma_get_range(struct device_node *np,
+ const struct bus_dma_region **map)
+{
+ return -ENODEV;
+}
+#endif
+
#endif /* __OF_ADDRESS_H */
Currently, of_dma_get_range is kept in of_private.h as it is used by only OF support code. Move it to of_address.h so that it can be used by the code outside OF support code. Signed-off-by: Atish Patra <atish.patra@wdc.com> --- drivers/of/of_private.h | 10 ---------- include/linux/of_address.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-)