We need to enhance of_pci_range_to_resources() enough that it won't make
sense for it to be inline anymore.  Move it to drivers/of/address.c,
keeping it under #ifdef CONFIG_PCI.

[bhelgaas: drop extra detail from changelog, move def under CONFIG_PCI]
Signed-off-by: Liviu Dudau <liviu.du...@arm.com>
Signed-off-by: Bjorn Helgaas <bhelg...@google.com>
CC: Grant Likely <grant.lik...@linaro.org>
CC: Rob Herring <robh...@kernel.org>
CC: Arnd Bergmann <a...@arndb.de>
CC: Catalin Marinas <catalin.mari...@arm.com>
---
 drivers/of/address.c       |  9 +++++++++
 include/linux/of_address.h | 15 +++------------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/of/address.c b/drivers/of/address.c
index 758d4f0..327a574 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -295,6 +295,15 @@ struct of_pci_range *of_pci_range_parser_one(struct 
of_pci_range_parser *parser,
 }
 EXPORT_SYMBOL_GPL(of_pci_range_parser_one);
 
+void of_pci_range_to_resource(struct of_pci_range *range,
+                             struct device_node *np, struct resource *res)
+{
+       res->flags = range->flags;
+       res->start = range->cpu_addr;
+       res->end = range->cpu_addr + range->size - 1;
+       res->parent = res->child = res->sibling = NULL;
+       res->name = np->full_name;
+}
 #endif /* CONFIG_PCI */
 
 /*
diff --git a/include/linux/of_address.h b/include/linux/of_address.h
index ecf913c..fa20aa1 100644
--- a/include/linux/of_address.h
+++ b/include/linux/of_address.h
@@ -129,18 +129,9 @@ extern const __be32 *of_get_pci_address(struct device_node 
*dev, int bar_no,
                               u64 *size, unsigned int *flags);
 extern int of_pci_address_to_resource(struct device_node *dev, int bar,
                                      struct resource *r);
-
-static inline void of_pci_range_to_resource(struct of_pci_range *range,
-                                           struct device_node *np,
-                                           struct resource *res)
-{
-       res->flags = range->flags;
-       res->start = range->cpu_addr;
-       res->end = range->cpu_addr + range->size - 1;
-       res->parent = res->child = res->sibling = NULL;
-       res->name = np->full_name;
-}
-
+extern void of_pci_range_to_resource(struct of_pci_range *range,
+                                    struct device_node *np,
+                                    struct resource *res);
 #else /* CONFIG_OF_ADDRESS && CONFIG_PCI */
 static inline int of_pci_address_to_resource(struct device_node *dev, int bar,
                                             struct resource *r)
-- 
2.1.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to