]> git.neil.brown.name Git - history.git/commitdiff
PCI: removed pcibios_present()
authorGreg Kroah-Hartman <greg@kroah.com>
Thu, 3 Oct 2002 07:06:24 +0000 (00:06 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Thu, 3 Oct 2002 07:06:24 +0000 (00:06 -0700)
drivers/net/hp100.c
drivers/net/tulip/de4x5.c
drivers/pci/compat.c
drivers/pci/syscall.c
include/linux/pci.h

index 7a23fe6bd93b29aefadd1a67210b8dd82183cef1..de55257a8c7feb484d6fe47e3443f2862c566569 100644 (file)
@@ -412,7 +412,7 @@ int __init hp100_probe(struct net_device *dev)
        /* First: scan PCI bus(es) */
 
 #ifdef CONFIG_PCI
-       if (pcibios_present()) {
+       if (pci_present()) {
                int pci_index;
                struct pci_dev *pci_dev = NULL;
                int pci_id_index;
@@ -2960,7 +2960,7 @@ static int __init hp100_module_init(void)
 {
        int i, cards;
 
-       if (hp100_port == 0 && !EISA_bus && !pcibios_present())
+       if (hp100_port == 0 && !EISA_bus && !pci_present())
                printk("hp100: You should not use auto-probing with insmod!\n");
 
        /* Loop on all possible base addresses */
index 93c8638010865dd252afbcc47257cb0407a3e2a1..e4cc1f9eaf1ff85fdb480f334bc3131602f39d14 100644 (file)
@@ -2190,7 +2190,7 @@ pci_probe(struct net_device *dev, u_long ioaddr)
 
     if (lastPCI == NO_MORE_PCI) return;
 
-    if (!pcibios_present()) {
+    if (!pci_present()) {
        lastPCI = NO_MORE_PCI;
        return;          /* No PCI bus in this machine! */
     }
@@ -5872,7 +5872,7 @@ count_adapters(void)
        if (EISA_signature(name, EISA_ID)) j++;
     }
 #endif
-    if (!pcibios_present()) return j;
+    if (!pci_present()) return j;
 
     for (i=0; (pdev=pci_find_class(class, pdev))!= NULL; i++) {
        vendor = pdev->vendor;
index 51e9b0828d083dff77c48e4fec5869fe5c134b7b..048c610a9e621b1a5b6018084cc79e508e306409 100644 (file)
 
 /* Obsolete functions, these will be going away... */
 
-int
-pcibios_present(void)
-{
-       return !list_empty(&pci_devices);
-}
-
 #define PCI_OP(rw,size,type)                                                   \
 int pcibios_##rw##_config_##size (unsigned char bus, unsigned char dev_fn,     \
                                  unsigned char where, unsigned type val)       \
@@ -35,8 +29,6 @@ PCI_OP(write, byte, char)
 PCI_OP(write, word, short)
 PCI_OP(write, dword, int)
 
-
-EXPORT_SYMBOL(pcibios_present);
 EXPORT_SYMBOL(pcibios_read_config_byte);
 EXPORT_SYMBOL(pcibios_read_config_word);
 EXPORT_SYMBOL(pcibios_read_config_dword);
index c935efd9a9335475e5c43d23f1fa4437db7d26fd..dd39d23d51ed9ebdb453ce690acca877ea3cb4f3 100644 (file)
@@ -98,7 +98,7 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn,
 
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;
-       if (!pcibios_present())
+       if (!pci_present())
                return -ENOSYS;
 
        dev = pci_find_slot(bus, dfn);
index 933e62a6813c33b11f4b81653df0623298728523..9c12d53f9dc7003cd9e0003d217cc8f99235f161 100644 (file)
@@ -322,15 +322,6 @@ enum pci_mmap_state {
 
 #define PCI_ANY_ID (~0)
 
-#define pci_present pcibios_present
-
-
-#define pci_for_each_dev_reverse(dev) \
-       for(dev = pci_dev_g(pci_devices.prev); dev != pci_dev_g(&pci_devices); dev = pci_dev_g(dev->global_list.prev))
-
-#define pci_for_each_bus(bus) \
-for(bus = pci_bus_b(pci_root_buses.next); bus != pci_bus_b(&pci_root_buses); bus = pci_bus_b(bus->node.next))
-
 /*
  * The pci_dev structure is used to describe both PCI and ISAPnP devices.
  */
@@ -503,8 +494,17 @@ struct pci_driver {
 /* these external functions are only available when PCI support is enabled */
 #ifdef CONFIG_PCI
 
+static inline int pci_present(void)
+{
+       return !list_empty(&pci_devices);
+}
+
 #define pci_for_each_dev(dev) \
        for(dev = pci_dev_g(pci_devices.next); dev != pci_dev_g(&pci_devices); dev = pci_dev_g(dev->global_list.next))
+#define pci_for_each_dev_reverse(dev) \
+       for(dev = pci_dev_g(pci_devices.prev); dev != pci_dev_g(&pci_devices); dev = pci_dev_g(dev->global_list.prev))
+#define pci_for_each_bus(bus) \
+       for(bus = pci_bus_b(pci_root_buses.next); bus != pci_bus_b(&pci_root_buses); bus = pci_bus_b(bus->node.next))
 
 void pcibios_fixup_bus(struct pci_bus *);
 int pcibios_enable_device(struct pci_dev *, int mask);
@@ -520,7 +520,6 @@ void pcibios_fixup_pbus_ranges(struct pci_bus *, struct pbus_set_ranges_data *);
 
 /* Backward compatibility, don't use in new code! */
 
-int pcibios_present(void);
 int pcibios_read_config_byte (unsigned char bus, unsigned char dev_fn,
                              unsigned char where, unsigned char *val);
 int pcibios_read_config_word (unsigned char bus, unsigned char dev_fn,
@@ -656,7 +655,7 @@ void pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t addr);
  */
 
 #ifndef CONFIG_PCI
-static inline int pcibios_present(void) { return 0; }
+static inline int pci_present(void) { return 0; }
 
 #define _PCI_NOP(o,s,t) \
        static inline int pcibios_##o##_config_##s (u8 bus, u8 dfn, u8 where, t val) \