History

of: Make of_dma_get_range() private

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.

Rob Herring committed 7 years ago

Commit 6e6faf61 parent 3a9ac953 files · +11 −9Browse files

Unified · Split

3 files
  1. drivers/of/address.c +0 −1
  2. drivers/of/of_private.h +11 −0
  3. include/linux/of_address.h +0 −8
drivers/of/address.c+0−1
@@ -972,7 +972,6 @@ out: · 971 unmodified lines
972972
973973 return ret;
974974 }
975−EXPORT_SYMBOL_GPL(of_dma_get_range);
976975
977976 /**
978977 * of_dma_is_coherent - Check if device is coherent
drivers/of/of_private.h+11−0
@@ -158,4 +158,15 @@ extern void __of_sysfs_remove_bin_file(struct device_node *np, · 157 unmodified lines
158158 #define for_each_transaction_entry_reverse(_oft, _te) \
159159 list_for_each_entry_reverse(_te, &(_oft)->te_list, node)
160160
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+
161172 #endif /* _LINUX_OF_PRIVATE_H */
include/linux/of_address.h+0−8
@@ -51,8 +51,6 @@ extern int of_pci_dma_range_parser_init(struct of_pci_range_parser *parser, · 50 unmodified lines
5151 extern struct of_pci_range *of_pci_range_parser_one(
5252 struct of_pci_range_parser *parser,
5353 struct of_pci_range *range);
54−extern int of_dma_get_range(struct device_node *np, u64 *dma_addr,
55− u64 *paddr, u64 *size);
5654 extern bool of_dma_is_coherent(struct device_node *np);
5755 #else /* CONFIG_OF_ADDRESS */
5856 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
9290 return NULL;
9391 }
9492
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−
10193 static inline bool of_dma_is_coherent(struct device_node *np)
10294 {
10395 return false;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t