]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
PCI: remove pcibios_scan_all_fns()
authorAlex Chiang <achiang@hp.com>
Mon, 22 Jun 2009 14:08:07 +0000 (08:08 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 9 Sep 2009 20:29:18 +0000 (13:29 -0700)
This was #define'd as 0 on all platforms, so let's get rid of it.

This change makes pci_scan_slot() slightly easier to read.

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Tony Luck <tony.luck@intel.com>
Cc: David Howells <dhowells@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 files changed:
arch/alpha/include/asm/pci.h
arch/arm/include/asm/pci.h
arch/h8300/include/asm/pci.h
arch/ia64/include/asm/pci.h
arch/mips/include/asm/pci.h
arch/mn10300/include/asm/pci.h
arch/parisc/include/asm/pci.h
arch/powerpc/include/asm/pci.h
arch/sh/include/asm/pci.h
arch/sparc/include/asm/pci_32.h
arch/sparc/include/asm/pci_64.h
arch/um/include/asm/pci.h
arch/x86/include/asm/pci.h
drivers/pci/probe.c
include/asm-generic/pci.h

index d22ace99d13dcbb1fb1d77d5ff4dff9ff1f508f6..dd8dcabf160fd16c438fb7fc4bef9fc52648e256 100644 (file)
@@ -52,7 +52,6 @@ struct pci_controller {
    bus numbers.  */
 
 #define pcibios_assign_all_busses()    1
-#define pcibios_scan_all_fns(a, b)     0
 
 #define PCIBIOS_MIN_IO         alpha_mv.min_io_address
 #define PCIBIOS_MIN_MEM                alpha_mv.min_mem_address
index 0abf386ba3d33ef742ace46dd94ba2d52299fabc..226cddd2fb6539c04dac621c34990ea449f3e36f 100644 (file)
@@ -6,8 +6,6 @@
 
 #include <mach/hardware.h> /* for PCIBIOS_MIN_* */
 
-#define pcibios_scan_all_fns(a, b)     0
-
 #ifdef CONFIG_PCI_HOST_ITE8152
 /* ITE bridge requires setting latency timer to avoid early bus access
    termination by PIC bus mater devices
index 97389b35aa3540f0fbd734afe9fc30c0d61c76de..cc9762091c0a3a47e3f66005c40df51712534228 100644 (file)
@@ -8,7 +8,6 @@
  */
 
 #define pcibios_assign_all_busses()    0
-#define pcibios_scan_all_fns(a, b)     0
 
 static inline void pcibios_set_master(struct pci_dev *dev)
 {
index fcfca56bb850641331c087c10197619f6b4c9d00..55281aabe5f2f4bc3361793f19f32540c17e47d2 100644 (file)
@@ -17,7 +17,6 @@
  * loader.
  */
 #define pcibios_assign_all_busses()     0
-#define pcibios_scan_all_fns(a, b)     0
 
 #define PCIBIOS_MIN_IO         0x1000
 #define PCIBIOS_MIN_MEM                0x10000000
@@ -135,7 +134,18 @@ extern void pcibios_resource_to_bus(struct pci_dev *dev,
 extern void pcibios_bus_to_resource(struct pci_dev *dev,
                struct resource *res, struct pci_bus_region *region);
 
-#define pcibios_scan_all_fns(a, b)     0
+static inline struct resource *
+pcibios_select_root(struct pci_dev *pdev, struct resource *res)
+{
+       struct resource *root = NULL;
+
+       if (res->flags & IORESOURCE_IO)
+               root = &ioport_resource;
+       if (res->flags & IORESOURCE_MEM)
+               root = &iomem_resource;
+
+       return root;
+}
 
 #define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
index a68d111e55e9ecf28617e6fc8188f373baba136a..5ebf82572ec06d14477dfebdc74aff5fa4e400e9 100644 (file)
@@ -65,8 +65,6 @@ extern int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
 
 extern unsigned int pcibios_assign_all_busses(void);
 
-#define pcibios_scan_all_fns(a, b)     0
-
 extern unsigned long PCIBIOS_MIN_IO;
 extern unsigned long PCIBIOS_MIN_MEM;
 
index 19aecc90f7a43f7b572f1ce7054bff0d70faae89..6095a28561ddc483e5c054912520191a265b9734 100644 (file)
@@ -101,7 +101,18 @@ extern void pcibios_bus_to_resource(struct pci_dev *dev,
                                    struct resource *res,
                                    struct pci_bus_region *region);
 
-#define pcibios_scan_all_fns(a, b)     0
+static inline struct resource *
+pcibios_select_root(struct pci_dev *pdev, struct resource *res)
+{
+       struct resource *root = NULL;
+
+       if (res->flags & IORESOURCE_IO)
+               root = &ioport_resource;
+       if (res->flags & IORESOURCE_MEM)
+               root = &iomem_resource;
+
+       return root;
+}
 
 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
 {
index 7d842d699df259b1b055b8c61bedb4bbeda9c8bc..64c7aa590ae5f52b44c0c9c5bb0adbb978e6fe38 100644 (file)
@@ -233,7 +233,6 @@ static inline void pcibios_register_hba(struct pci_hba_data *x)
  *   rp7420/8420 boxes and then revisit this issue.
  */
 #define pcibios_assign_all_busses()     (1)
-#define pcibios_scan_all_fns(a, b)     (0)
 
 #define PCIBIOS_MIN_IO          0x10
 #define PCIBIOS_MIN_MEM         0x1000 /* NBPG - but pci/setup-res.c dies */
index d9483c504d2d37cffeb6a3171f1d040e1b7f6194..36057c821ff4727f61658eba2243b57cd30d5d66 100644 (file)
@@ -40,7 +40,6 @@ struct pci_dev;
  */
 #define pcibios_assign_all_busses() \
        (ppc_pci_has_flag(PPC_PCI_REASSIGN_ALL_BUS))
-#define pcibios_scan_all_fns(a, b)     0
 
 static inline void pcibios_set_master(struct pci_dev *dev)
 {
index d3633f513ebcf28e5abc01c5c9a7c0b6f8ed1c66..4163950cd1c6e329ca76b60fafb46f91f4440e8b 100644 (file)
@@ -10,7 +10,6 @@
    or architectures with incomplete PCI setup by the loader */
 
 #define pcibios_assign_all_busses()    1
-#define pcibios_scan_all_fns(a, b)     0
 
 /*
  * A board can define one or more PCI channels that represent built-in (or
index b41c4c1981591b66df0a41b1c3d1e81b7099d400..810d9248e23fa84e479571fd6a6136da7cd7270b 100644 (file)
@@ -10,7 +10,6 @@
  * or architectures with incomplete PCI setup by the loader.
  */
 #define pcibios_assign_all_busses()    0
-#define pcibios_scan_all_fns(a, b)     0
 
 #define PCIBIOS_MIN_IO         0UL
 #define PCIBIOS_MIN_MEM                0UL
index 7a1e3566e59c253327e25d489177694e821bf3f5..a32970888287a8bcfe3aa596bdd6066fea3f5d10 100644 (file)
@@ -10,7 +10,6 @@
  * or architectures with incomplete PCI setup by the loader.
  */
 #define pcibios_assign_all_busses()    0
-#define pcibios_scan_all_fns(a, b)     0
 
 #define PCIBIOS_MIN_IO         0UL
 #define PCIBIOS_MIN_MEM                0UL
index 59923199cdc36b439b5b30bdd9c80cbe83db8902..b44cf59ede1edc9ccf610c5e5b270a221257144d 100644 (file)
@@ -2,6 +2,5 @@
 #define __UM_PCI_H
 
 #define PCI_DMA_BUS_IS_PHYS     (1)
-#define pcibios_scan_all_fns(a, b)     0
 
 #endif
index 1ff685ca221ceec7fd324f6409393984aec4c399..f76a162c082c70f882fb6cdd0a8e73c955d2ef02 100644 (file)
@@ -48,7 +48,6 @@ extern unsigned int pcibios_assign_all_busses(void);
 #else
 #define pcibios_assign_all_busses()    0
 #endif
-#define pcibios_scan_all_fns(a, b)     0
 
 extern unsigned long pci_mem_start;
 #define PCIBIOS_MIN_IO         0x1000
index 40e75f6a505622fb124085aea0e207bfa4107eae..b9d4e95aafba5476a4fe1ebc468b9079e32f9cf7 100644 (file)
@@ -1061,8 +1061,7 @@ int pci_scan_slot(struct pci_bus *bus, int devfn)
        if (dev && !dev->is_added)      /* new device? */
                nr++;
 
-       if ((dev && dev->multifunction) ||
-           (!dev && pcibios_scan_all_fns(bus, devfn))) {
+       if (dev && dev->multifunction) {
                for (fn = 1; fn < 8; fn++) {
                        dev = pci_scan_single_device(bus, devfn + fn);
                        if (dev) {
index b4326b5466ebb35130a59e861cda6d8e396b5e3a..26373cff454632e91e1021251f14722032906c1b 100644 (file)
@@ -30,7 +30,18 @@ pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
        res->end = region->end;
 }
 
-#define pcibios_scan_all_fns(a, b)     0
+static inline struct resource *
+pcibios_select_root(struct pci_dev *pdev, struct resource *res)
+{
+       struct resource *root = NULL;
+
+       if (res->flags & IORESOURCE_IO)
+               root = &ioport_resource;
+       if (res->flags & IORESOURCE_MEM)
+               root = &iomem_resource;
+
+       return root;
+}
 
 #ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)