of_dma_get_range() is only used within the DT core code, so remove the export and move the header declaration to the private header.
Unified · Split
| @@ -972,7 +972,6 @@ out: · 971 unmodified lines | |||
| 972 | 972 | ||
| 973 | return ret; | 973 | return ret; |
| 974 | } | 974 | } |
| 975 | EXPORT_SYMBOL_GPL(of_dma_get_range); | ||
| 976 | 975 | ||
| 977 | /** | 976 | /** |
| 978 | * of_dma_is_coherent - Check if device is coherent | 977 | * of_dma_is_coherent - Check if device is coherent |
| @@ -158,4 +158,15 @@ extern void __of_sysfs_remove_bin_file(struct device_node *np, · 157 unmodified lines | |||
| 158 | #define for_each_transaction_entry_reverse(_oft, _te) \ | 158 | #define for_each_transaction_entry_reverse(_oft, _te) \ |
| 159 | list_for_each_entry_reverse(_te, &(_oft)->te_list, node) | 159 | list_for_each_entry_reverse(_te, &(_oft)->te_list, node) |
| 160 | 160 | ||
| 161 | #ifdef CONFIG_OF_ADDRESS | ||
| 162 | extern int of_dma_get_range(struct device_node *np, u64 *dma_addr, | ||
| 163 | u64 *paddr, u64 *size); | ||
| 164 | #else | ||
| 165 | static inline int of_dma_get_range(struct device_node *np, u64 *dma_addr, | ||
| 166 | u64 *paddr, u64 *size) | ||
| 167 | { | ||
| 168 | return -ENODEV; | ||
| 169 | } | ||
| 170 | #endif | ||
| 171 | |||
| 161 | #endif /* _LINUX_OF_PRIVATE_H */ | 172 | #endif /* _LINUX_OF_PRIVATE_H */ |
| @@ -51,8 +51,6 @@ extern int of_pci_dma_range_parser_init(struct of_pci_range_parser *parser, · 50 unmodified lines | |||
| 51 | extern struct of_pci_range *of_pci_range_parser_one( | 51 | extern struct of_pci_range *of_pci_range_parser_one( |
| 52 | struct of_pci_range_parser *parser, | 52 | struct of_pci_range_parser *parser, |
| 53 | struct of_pci_range *range); | 53 | struct of_pci_range *range); |
| 54 | extern int of_dma_get_range(struct device_node *np, u64 *dma_addr, | ||
| 55 | u64 *paddr, u64 *size); | ||
| 56 | extern bool of_dma_is_coherent(struct device_node *np); | 54 | extern bool of_dma_is_coherent(struct device_node *np); |
| 57 | #else /* CONFIG_OF_ADDRESS */ | 55 | #else /* CONFIG_OF_ADDRESS */ |
| 58 | static inline void __iomem *of_io_request_and_map(struct device_node *device, | 56 | static inline void __iomem *of_io_request_and_map(struct device_node *device, |
| @@ -92,12 +90,6 @@ static inline struct of_pci_range *of_pci_range_parser_one( · 33 unmodified lines | |||
| 92 | return NULL; | 90 | return NULL; |
| 93 | } | 91 | } |
| 94 | 92 | ||
| 95 | static inline int of_dma_get_range(struct device_node *np, u64 *dma_addr, | ||
| 96 | u64 *paddr, u64 *size) | ||
| 97 | { | ||
| 98 | return -ENODEV; | ||
| 99 | } | ||
| 100 | |||
| 101 | static inline bool of_dma_is_coherent(struct device_node *np) | 93 | static inline bool of_dma_is_coherent(struct device_node *np) |
| 102 | { | 94 | { |
| 103 | return false; | 95 | return false; |