History

PCI: Move DT resource setup into devm_pci_alloc_host_bridge()

Now that pci_parse_request_of_pci_ranges() callers just setup pci_host_bridge.windows and dma_ranges directly and don't need the bus range returned, we can just initialize them when allocating the pci_host_bridge struct. With this, pci_parse_request_of_pci_ranges() becomes a static function.

Rob Herring committed 6 years ago

Commit 669cbc71 parent 4a9575624 files · +36 −155Browse files

Showing the changes to include/linux (1 of 24 files). Show all

Unified · Split

include/linux/pci.h+0−12
@@ -2303,10 +2303,6 @@ int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off, · 2302 unmodified lines
2303struct device_node;2303struct device_node;
2304struct irq_domain;2304struct irq_domain;
2305struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus);2305struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus);
2306int pci_parse_request_of_pci_ranges(struct device *dev,
2307 struct list_head *resources,
2308 struct list_head *ib_resources,
2309 struct resource **bus_range);
2310 2306
2311/* Arch may override this (weak) */2307/* Arch may override this (weak) */
2312struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus);2308struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus);
@@ -2314,14 +2310,6 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus); · 1 unmodified line
2314#else /* CONFIG_OF */2310#else /* CONFIG_OF */
2315static inline struct irq_domain *2311static inline struct irq_domain *
2316pci_host_bridge_of_msi_domain(struct pci_bus *bus) { return NULL; }2312pci_host_bridge_of_msi_domain(struct pci_bus *bus) { return NULL; }
2317static inline int
2318pci_parse_request_of_pci_ranges(struct device *dev,
2319 struct list_head *resources,
2320 struct list_head *ib_resources,
2321 struct resource **bus_range)
2322{
2323 return -EINVAL;
2324}
2325#endif /* CONFIG_OF */2313#endif /* CONFIG_OF */
2326 2314
2327static inline struct device_node *2315static inline struct device_node *