diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2002-10-03 00:06:24 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2002-10-03 00:06:24 -0700 |
| commit | 36be8435c1ad70461e93840606a1b4ef2c9e7f5f (patch) | |
| tree | 8df319f7d2839b8f08dd842ddf448867ee5ac83c /include/linux | |
| parent | 4a66ae8251604a7c8a262e8d2302a26de62a2b16 (diff) | |
PCI: removed pcibios_present()
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pci.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 933e62a6813c..9c12d53f9dc7 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -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) \ |
