PCI: uninline pci_ioremap_bar()
authorAndrew Morton <akpm@linux-foundation.org>
Mon, 1 Dec 2008 22:30:30 +0000 (14:30 -0800)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 7 Jan 2009 19:12:57 +0000 (11:12 -0800)
It's too large to be inlined.

Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pci.c
include/linux/pci.h

index 1fb7cff4cdaedb86443912be8d70b327cac653c4..9354dd63f03553328d71ab31cad80ff0ec392b8b 100644 (file)
@@ -56,6 +56,22 @@ unsigned char pci_bus_max_busnr(struct pci_bus* bus)
 }
 EXPORT_SYMBOL_GPL(pci_bus_max_busnr);
 
+#ifdef CONFIG_HAS_IOMEM
+void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
+{
+       /*
+        * Make sure the BAR is actually a memory resource, not an IO resource
+        */
+       if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
+               WARN_ON(1);
+               return NULL;
+       }
+       return ioremap_nocache(pci_resource_start(pdev, bar),
+                                    pci_resource_len(pdev, bar));
+}
+EXPORT_SYMBOL_GPL(pci_ioremap_bar);
+#endif
+
 #if 0
 /**
  * pci_max_busnr - returns maximum PCI bus number
index 58357d14f94c89ba64d22029949f6d4067187430..0d8bc920c2e57b61236ea21eb45e0bf5cb6195d0 100644 (file)
@@ -1160,20 +1160,7 @@ static inline void pci_mmcfg_late_init(void) { }
 
 int pci_ext_cfg_avail(struct pci_dev *dev);
 
-#ifdef CONFIG_HAS_IOMEM
-static inline void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
-{
-       /*
-        * Make sure the BAR is actually a memory resource, not an IO resource
-        */
-       if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
-               WARN_ON(1);
-               return NULL;
-       }
-       return ioremap_nocache(pci_resource_start(pdev, bar),
-                                    pci_resource_len(pdev, bar));
-}
-#endif
+void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
 
 #endif /* __KERNEL__ */
 #endif /* LINUX_PCI_H */